[jsword-svn] common s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Mon May 16 17:47:04 MST 2005
Update of /cvs/jsword/common
In directory www.crosswire.org:/tmp/cvs-serv25437
Modified Files:
.project
Added Files:
LicenseHeader.txt .checkstyle JSwordChecks.xml
Log Message:
Added support for CheckStyle plugin.
Added a few more CheckStyle rules.
Fixed a spelling mistake.
Index: .project
===================================================================
RCS file: /cvs/jsword/common/.project,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** .project 12 Nov 2004 19:19:54 -0000 1.3
--- .project 17 May 2005 00:47:02 -0000 1.4
***************
*** 16,19 ****
--- 16,24 ----
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
***************
*** 21,24 ****
--- 26,30 ----
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
+ <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
</natures>
</projectDescription>
--- NEW FILE: LicenseHeader.txt ---
/**
* Distribution License:
* JSword is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2 as published by
* the Free Software Foundation. This program is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* The License is available on the internet at:
* http://www.gnu.org/copyleft/gpl.html
* or by writing to:
* Free Software Foundation, Inc.
* 59 Temple Place - Suite 330
* Boston, MA 02111-1307, USA
*
* Copyright: 2005
* The copyright to this program is held by it's authors.
*
* ID: $Id: LicenseHeader.txt,v 1.1 2005/05/17 00:47:02 dmsmith Exp $
*/
--- NEW FILE: .checkstyle ---
<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.1.0" simple-config="true">
<fileset name="all" check-config-name="JSword Coding Style" enabled="true"><file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
<filter name="FilesFromPackage" enabled="true"><filter-data value="java/limbo"/>
<filter-data value="java/test"/>
<filter-data value="java/tar"/>
<filter-data value="resource"/>
</filter>
<filter name="NonSrcDirs" enabled="true"/>
</fileset-config>
--- NEW FILE: JSwordChecks.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="FileContentsHolder">
<property name="severity" value="error"/>
</module>
<module name="ArrayTypeStyle">
<property name="severity" value="error"/>
</module>
<module name="GenericIllegalRegexp">
<property name="severity" value="error"/>
<property name="format" value="((public)|(protected))\s+void\s+finalize\(\s*\)"/>
</module>
<module name="ModifierOrder">
<property name="severity" value="error"/>
</module>
<module name="TodoComment">
<property name="severity" value="error"/>
</module>
<module name="UncommentedMain">
<property name="severity" value="error"/>
<property name="excludedClasses" value="Desktop|APIExamples"/>
</module>
<module name="UpperEll">
<property name="severity" value="error"/>
</module>
<module name="AvoidNestedBlocks">
<property name="severity" value="error"/>
</module>
<module name="EmptyBlock">
<property name="severity" value="error"/>
<property name="option" value="text"/>
</module>
<module name="LeftCurly">
<property name="severity" value="error"/>
<property name="option" value="nl"/>
</module>
<module name="NeedBraces">
<property name="severity" value="error"/>
<property name="tokens" value="LITERAL_DO, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE"/>
</module>
<module name="RightCurly">
<property name="severity" value="error"/>
<property name="option" value="alone"/>
</module>
<module name="CovariantEquals">
<property name="severity" value="error"/>
</module>
<module name="DefaultComesLast">
<property name="severity" value="error"/>
</module>
<module name="DoubleCheckedLocking">
<property name="severity" value="error"/>
</module>
<module name="EmptyStatement">
<property name="severity" value="error"/>
</module>
<module name="EqualsHashCode">
<property name="severity" value="error"/>
</module>
<module name="FallThrough">
<property name="severity" value="error"/>
</module>
<module name="HiddenField">
<property name="severity" value="error"/>
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="IllegalInstantiation">
<property name="severity" value="error"/>
<property name="classes" value="java.lang.Boolean, java.lang.String"/>
</module>
<module name="IllegalTokenText">
<property name="severity" value="error"/>
<property name="tokens" value="NUM_INT,NUM_LONG"/>
<property name="format" value="^0[^lx]"/>
<property name="ignoreCase" value="true"/>
</module>
<module name="InnerAssignment">
<property name="severity" value="error"/>
</module>
<module name="JUnitTestCase">
<property name="severity" value="error"/>
</module>
<module name="MissingSwitchDefault">
<property name="severity" value="error"/>
</module>
<module name="MultipleVariableDeclarations">
<property name="severity" value="error"/>
</module>
<module name="NestedIfDepth">
<property name="severity" value="error"/>
<property name="max" value="3"/>
</module>
<module name="NestedTryDepth">
<property name="severity" value="error"/>
<property name="max" value="3"/>
</module>
<module name="PackageDeclaration">
<property name="severity" value="error"/>
</module>
<module name="SimplifyBooleanExpression">
<property name="severity" value="error"/>
</module>
<module name="SimplifyBooleanReturn">
<property name="severity" value="error"/>
</module>
<module name="StringLiteralEquality">
<property name="severity" value="error"/>
</module>
<module name="SuperClone">
<property name="severity" value="error"/>
</module>
<module name="SuperFinalize">
<property name="severity" value="error"/>
</module>
<module name="HideUtilityClassConstructor">
<property name="severity" value="error"/>
</module>
<module name="InterfaceIsType">
<property name="severity" value="error"/>
</module>
<module name="MutableException">
<property name="severity" value="error"/>
</module>
<module name="VisibilityModifier">
<property name="severity" value="error"/>
<property name="protectedAllowed" value="true"/>
</module>
<module name="AvoidStarImport">
<property name="severity" value="error"/>
</module>
<module name="IllegalImport">
<property name="severity" value="error"/>
</module>
<module name="RedundantImport">
<property name="severity" value="error"/>
</module>
<module name="UnusedImports">
<property name="severity" value="error"/>
</module>
<module name="JavadocType">
<property name="severity" value="error"/>
<property name="authorFormat" value="\S"/>
</module>
<module name="ConstantName">
<property name="severity" value="error"/>
<property name="format" value="^(log|instance|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$"/>
</module>
<module name="LocalFinalVariableName">
<property name="severity" value="error"/>
<property name="format" value="[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="LocalVariableName">
<property name="severity" value="error"/>
<property name="format" value="[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="MemberName">
<property name="severity" value="error"/>
<property name="format" value="[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="MethodName">
<property name="severity" value="error"/>
</module>
<module name="PackageName">
<property name="severity" value="error"/>
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,11})*$"/>
</module>
<module name="ParameterName">
<property name="severity" value="error"/>
<property name="format" value="[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="StaticVariableName">
<property name="severity" value="error"/>
<property name="format" value="[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="TypeName">
<property name="severity" value="error"/>
</module>
<module name="AnonInnerLength">
<property name="max" value="100"/>
</module>
<module name="ExecutableStatementCount">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="This should be set to something much smaller."/>
<property name="severity" value="error"/>
<property name="max" value="125"/>
<property name="tokens" value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
</module>
<module name="FileLength">
<property name="severity" value="error"/>
</module>
<module name="LineLength">
<property name="severity" value="ignore"/>
<property name="ignorePattern" value="^\s*[{]\s*\d{1,5}(,\s*\d{1,5})*\s*[}],$"/>
<property name="max" value="256"/>
</module>
<module name="EmptyForInitializerPad">
<property name="severity" value="error"/>
<property name="option" value="space"/>
</module>
<module name="EmptyForIteratorPad">
<property name="severity" value="error"/>
<property name="option" value="space"/>
</module>
<module name="MethodParamPad">
<property name="severity" value="error"/>
</module>
<module name="NoWhitespaceAfter">
<property name="severity" value="error"/>
<property name="allowLineBreaks" value="false"/>
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore">
<property name="severity" value="error"/>
<property name="allowLineBreaks" value="false"/>
<property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/>
</module>
<module name="OperatorWrap">
<property name="severity" value="error"/>
</module>
<module name="ParenPad">
<property name="severity" value="error"/>
</module>
<module name="TabCharacter">
<property name="severity" value="error"/>
</module>
<module name="TypecastParenPad">
<property name="severity" value="error"/>
</module>
<module name="WhitespaceAfter">
<property name="severity" value="error"/>
</module>
<module name="WhitespaceAround">
<property name="severity" value="error"/>
</module>
<module name="MethodLength">
<property name="severity" value="error"/>
<property name="countEmpty" value="false"/>
</module>
<module name="ParameterNumber">
</module>
<module name="usage.UnusedLocalVariable">
<property name="severity" value="error"/>
</module>
<module name="usage.UnusedParameter">
<property name="severity" value="ignore"/>
</module>
<module name="usage.UnusedPrivateField">
<property name="severity" value="error"/>
<property name="ignoreFormat" value="serialVersionUID"/>
</module>
<module name="usage.UnusedPrivateMethod">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Buggy"/>
<property name="severity" value="ignore"/>
</module>
<module name="JavadocMethod">
<property name="severity" value="ignore"/>
<property name="scope" value="public"/>
</module>
<module name="JavadocVariable">
<property name="severity" value="error"/>
<property name="excludeScope" value="protected"/>
<property name="scope" value="public"/>
</module>
<module name="JavadocStyle">
<property name="severity" value="ignore"/>
<property name="excludeScope" value="nothing"/>
</module>
<module name="AbstractClassName">
<property name="severity" value="error"/>
<property name="format" value="^Abstract.*$|^.*Factory$|^.*Type$"/>
</module>
<module name="RedundantModifier">
<property name="severity" value="error"/>
</module>
<module name="ImportOrder">
<property name="severity" value="error"/>
</module>
<module name="UnnecessaryParentheses">
<property name="severity" value="error"/>
</module>
<module name="AvoidInlineConditionals">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="JSword allows these."/>
<property name="severity" value="ignore"/>
</module>
<module name="DeclarationOrder">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="JSword does not follow this."/>
<property name="severity" value="ignore"/>
</module>
<module name="ExplicitInitialization">
</module>
<module name="FinalLocalVariable">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Too big of a change for now."/>
<property name="severity" value="ignore"/>
<property name="tokens" value="PARAMETER_DEF,VARIABLE_DEF"/>
</module>
<module name="IllegalCatch">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="We should do this."/>
<property name="severity" value="ignore"/>
</module>
<module name="IllegalType">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="This is too much."/>
<property name="severity" value="ignore"/>
<property name="tokens" value="METHOD_DEF,PARAMETER_DEF,VARIABLE_DEF"/>
</module>
<module name="MagicNumber">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="JSword has tables of numbers."/>
<property name="severity" value="ignore"/>
</module>
<module name="MissingCtor">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="JSword allows default ctor."/>
<property name="severity" value="ignore"/>
</module>
<module name="ModifiedControlVariable">
<property name="severity" value="error"/>
</module>
<module name="MultipleStringLiterals">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="This should be lowered."/>
<property name="severity" value="error"/>
<property name="allowedDuplicates" value="7"/>
</module>
<module name="ParameterAssignment">
<property name="severity" value="error"/>
</module>
<module name="RedundantThrows">
<property name="severity" value="error"/>
<property name="allowUnchecked" value="true"/>
<property name="allowSubclasses" value="true"/>
</module>
<module name="RequireThis">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="JSword does not require this."/>
<property name="severity" value="ignore"/>
</module>
<module name="ReturnCount">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="This would be too big to change."/>
<property name="severity" value="ignore"/>
</module>
<module name="ArrayTrailingComma">
<property name="severity" value="error"/>
</module>
<module name="DesignForExtension">
<property name="severity" value="ignore"/>
</module>
<module name="FinalClass">
<property name="severity" value="error"/>
</module>
<module name="ThrowsCount">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Should this be less?"/>
<property name="severity" value="error"/>
<property name="max" value="6"/>
</module>
<module name="FinalParameters">
<property name="severity" value="ignore"/>
</module>
<module name="Indentation">
<property name="severity" value="error"/>
<property name="caseIndent" value="0"/>
</module>
<module name="TrailingComment">
<property name="severity" value="ignore"/>
</module>
<module name="j2ee.FinalStatic">
<property name="severity" value="error"/>
</module>
<module name="j2ee.ThisParameter">
<property name="severity" value="error"/>
</module>
<module name="j2ee.ThisReturn">
<property name="severity" value="error"/>
</module>
<module name="usage.OneMethodPrivateField">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Buggy. Should ignore static fields."/>
<property name="severity" value="ignore"/>
</module>
<module name="Header">
<property name="headerFile" value="E:\Eclipse\JSword\common\LicenseHeader.txt"/>
<property name="ignoreLines" value="20"/>
</module>
<module name="RequiredRegexp">
<property name="format" value="see gnu.gpl.License for license details."/>
</module>
</module>
<module name="PackageHtml">
<property name="severity" value="error"/>
</module>
<module name="NewlineAtEndOfFile">
<property name="severity" value="error"/>
</module>
<module name="Translation">
<property name="severity" value="error"/>
</module>
</module>
More information about the jsword-svn
mailing list