MOEAFramework-3.4.auxiliary.checkstyle.checks.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moeaframework Show documentation
Show all versions of moeaframework Show documentation
An Open Source Java Framework for Multiobjective Optimization
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <!-- Copyright 2009-2023 David Hadka This file is part of the MOEA Framework. The MOEA Framework is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The MOEA Framework 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the MOEA Framework. If not, see <http://www.gnu.org/licenses/>. --> <module name="Checker"> <module name="SuppressionFilter"> <property name="file" value="${basedir}/auxiliary/checkstyle/suppressions.xml"/> <property name="optional" value="false"/> </module> <!-- Source code files contain appropriate copyright and license notices --> <module name="RegexpHeader"> <property name="headerFile" value="${basedir}/auxiliary/checkstyle/header.txt" /> <property name="fileExtensions" value="java,c,h" /> </module> <!-- Files must end with new line character --> <!-- <module name="NewlineAtEndOfFile"/> --> <!-- No trailing whitespace at end of line --> <!-- <module name="RegexpSingleline"> <property name="format" value="\s+$"/> </module> --> <!-- Package info files should include javadoc comments --> <!-- This does not work properly when src and test folders share the same package structure, as the package-info.java files are only in src --> <!-- <module name="JavadocPackage" /> --> <!-- Ensure consistency among properties files --> <module name="Translation" /> <module name="TreeWalker"> <property name="tabWidth" value="4"/> <!-- Explicitly define all imported classes --> <module name="AvoidStarImport" /> <!-- No unused imports --> <module name="UnusedImports"> <property name="processJavadoc" value="true" /> </module> <!-- No redundant imports --> <module name="RedundantImport" /> <!-- Prevent empty blocks that do not at least contain a comment --> <module name="EmptyBlock"> <property name="option" value="text"/> </module> <!-- Ensure all code blocks contain properly formatted braces --> <module name="NeedBraces" /> <module name="LeftCurly" /> <module name="RightCurly" /> <!-- Deprecation flags must appear as annotations and javadoc tags --> <!-- This currently causes too many false positives when no javadoc tag exists on overridden methods --> <!-- <module name="MissingDeprecated"/> --> <module name="MissingOverride"> <property name="javaFiveCompatibility" value="true"/> </module> <!-- Package annotations should be placed in package-info.java --> <module name="PackageAnnotation"/> <!-- Override hashCode when equals is also overridden --> <module name="EqualsHashCode" /> <!-- Long constants should use primitive long and not object Long --> <module name="UpperEll" /> <!-- Array brackets should be placed immediately following the type (e.g., String[] names) --> <module name="ArrayTypeStyle" /> <!-- The class name and file name must match --> <module name="OuterTypeFilename"/> <!-- Modifiers should be in the JLS defined order --> <module name="ModifierOrder" /> <!-- Prevent unnecessary whitespace --> <module name="GenericWhitespace"/> <module name="MethodParamPad"/> <module name="ParenPad"/> <module name="TypecastParenPad"/> <!-- Equals methods must use Object parameter --> <module name="CovariantEquals"/> <!-- No empty ; statements --> <module name="EmptyStatement"/> <!-- Constructors must be explicitly defined --> <!-- Several instances exist that should be fixed --> <!-- <module name="MissingCtor"/> --> <!-- <module name="EqualsAvoidNull"/> --> <!-- No magic numbers --> <!-- The source currently contains too many magic numbers --> <!-- <module name="MagicNumber"/> --> <!-- Control variables in for loops should not be modified --> <!-- Several instances exist that should be fixed --> <module name="ModifiedControlVariable"/> <!-- Do not wrap boolean return statements in conditional statement --> <module name="SimplifyBooleanExpression" /> <module name="SimplifyBooleanReturn"/> <!-- Never compare strings with == or != --> <module name="StringLiteralEquality"/> <!-- Ensure clone and finalize methods call super --> <module name="SuperClone"/> <module name="SuperFinalize"/> <!-- Every package must have a package declaration --> <module name="PackageDeclaration"/> <!-- Contents of a class/interface appear in a standard order --> <!-- <module name="DeclarationOrder"/> --> <!-- Switch statements should be structured correctly --> <module name="DefaultComesLast"/> <module name="MissingSwitchDefault"/> <module name="FallThrough" /> <!-- Only one variable declaration is allowed per line --> <module name="MultipleVariableDeclarations"/> <!-- Only one statement is allowed per line --> <module name="OneStatementPerLine"/> <!-- Classes with only static methods must hide constructor --> <!-- <module name="HideUtilityClassConstructor" /> --> <!-- All variables in an exception are final --> <module name="MutableException"/> <!-- Classes with private constructors should be final --> <!-- <module name="FinalClass"/> --> <module name="InterfaceIsType"/> <!-- <module name="JavadocType"> <property name="scope" value="protected" /> </module> <module name="JavadocMethod"> <property name="scope" value="protected" /> </module> <module name="JavadocVariable"> <property name="scope" value="protected" /> </module> --> <!-- Naming conventions --> <!-- More of the naming conventions should be used, but this must wait till a major release as some names are public --> <module name="ClassTypeParameterName" /> <module name="PackageName" /> <module name="MethodTypeParameterName" /> <module name="TypeName" /> <!-- Fields should not be public --> <module name="VisibilityModifier"> <property name="protectedAllowed" value="true" /> <property name="packageAllowed" value="true" /> </module> <!-- Prevent importing from the sun.* packages --> <module name="IllegalImport" /> <!-- Use the factory methods to create booleans and strings --> <module name="IllegalInstantiation"> <property name="classes" value="java.lang.Boolean, java.lang.String"/> </module> <!-- Avoid using these types explicitly, use their interfaces instead --> <!-- <module name="IllegalType"> <property name="format" value="^$"/> <property name="illegalClassNames" value="java.util.GregorianCalendar, java.util.Hashtable, java.util.HashSet, java.util.HashMap, java.util.ArrayList, java.util.LinkedHashMap, java.util.LinkedHashSet, java.util.TreeSet, java.util.TreeMap, java.util.Vector"/> </module> --> <!-- Avoid using nested blocks (blocks without control statement) --> <module name="AvoidNestedBlocks" /> <!-- <module name="InnerAssignment" /> --> </module> </module>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy