diff --git a/README.md b/README.md index 3a04d0b8c..6d2783cad 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ checking Java source code for adherence to a Code Standard or set of validation The latest version can be found at [SourceForge downloads](https://sourceforge.net/projects/checkstyle/files/checkstyle/) or at [Maven repo](http://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/). -Documentation is available in HTML format, see http://checkstyle.sourceforge.net/availablechecks.html. +Documentation is available in HTML format, see http://checkstyle.sourceforge.net/checks.html. Continuous integration and Quality reports ====================== diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/AllChecksPresentOnAvailableChecksPageTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/AllChecksPresentOnAvailableChecksPageTest.java index 811c6f711..a6b0edd36 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/AllChecksPresentOnAvailableChecksPageTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/AllChecksPresentOnAvailableChecksPageTest.java @@ -33,7 +33,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; public class AllChecksPresentOnAvailableChecksPageTest { private static final File JAVA_SOURCES_DIRECTORY = new File("src/main/java"); - private static final String AVAILABLE_CHECKS_PATH = "src/xdocs/availablechecks.xml"; + private static final String AVAILABLE_CHECKS_PATH = "src/xdocs/checks.xml"; private static final File AVAILABLE_CHECKS_FILE = new File(AVAILABLE_CHECKS_PATH); private static final String CHECK_FILE_NAME = ".+Check.java$"; private static final String CHECK_SUFFIX = "Check.java"; diff --git a/src/xdocs/availablechecks.xml b/src/xdocs/availablechecks.xml deleted file mode 100644 index f1cf0139f..000000000 --- a/src/xdocs/availablechecks.xml +++ /dev/null @@ -1,772 +0,0 @@ - - - - - - - Available Checks - Checkstyle Development Team - - - -
-

- Checkstyle provides many checks that you can apply to your - source code. Below is an alphabetical reference, the site - navigation menu provides a reference organized by functionality. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AbbreviationAsWordInNameThe Check validate abbreviations(consecutive capital letters) - length in identifier name, it also allow in enforce camel case naming.
AbstractClassName - Ensures that the names of abstract classes conforming to some - regular expression. -
AnnotationLocationCheck location of annotation on language elements.
AnnotationUseStyleThis check controls the style with the usage of annotations.
AnonInnerLengthChecks for long anonymous inner classes.
ArrayTrailingCommaChecks if array initialization contains optional trailing comma.
ArrayTypeStyleChecks the style of array type definitions.
AtclauseOrderChecks the order of at-clauses.
AvoidEscapedUnicodeCharactersRestrict using Unicode escapes.
AvoidInlineConditionalsDetects inline conditionals.
AvoidNestedBlocksFinds nested blocks.
AvoidStarImportCheck that finds import statements that use the * notation.
AvoidStaticImportCheck that finds static imports.
BooleanExpressionComplexity - Restricts nested boolean operators (&&, ||, &, | - and ^) to a specified depth (default = 3). -
ClassDataAbstractionCouplingThis metric measures the number of instantiations of other classes within the given class.
ClassFanOutComplexityThe number of other classes a given class relies on.
ClassTypeParameterName - Checks that class type parameter names conform to a format - specified by the format property. -
ConstantNameChecks that constant names conform to a format specified by the format property.
CovariantEquals - Checks that if a class defines a covariant method equals, then - it defines method equals(java.lang.Object). -
CustomImportOrder - Checks that the groups of import declarations appear in the order specified - by the user. -
CyclomaticComplexityChecks cyclomatic complexity against a specified limit.
DeclarationOrder - Checks that the parts of a class or interface declaration - appear in the order suggested by the Code Conventions for the Java Programming Language. -
DefaultComesLast - Check that the default is after all the - cases in a switch statement. -
DescendantTokenChecks for restricted tokens beneath other tokens.
DesignForExtensionChecks that classes are designed for inheritance.
EmptyBlockChecks for empty blocks.
EmptyCatchBlockChecks for empty catch blocks with few options to skip violation.
EmptyForInitializerPadChecks the padding of an empty for initializer; that is whether a - space is required at an empty for initializer, or such spaces are - forbidden.
EmptyForIteratorPadChecks the padding of an empty for iterator; that is whether a - space is required at an empty for iterator, or such spaces are - forbidden.
EmptyLineSeparatorChecks for blank line separators.
EmptyStatement - Detects empty statements (standalone ';').
EqualsAvoidNull - Checks that any combination of String literals with optional - assignment is on the left side of an equals() comparison.
EqualsHashCode - Checks that classes that override equals() also override hashCode().
ExecutableStatementCount - Restricts the number of executable statements to a specified - limit (default = 30). -
ExplicitInitialization - Checks if any class or object member explicitly initialized - to default for its type value (null for object - references, zero for numeric types and char - and false for boolean. -
FallThroughChecks for fall through in switch statements - Finds locations where a case contains Java code - - but lacks a break, return, throw or continue statement.
FileLength - Checks for long source files.
FileTabCharacterChecks to see if a file contains a tab character.
FinalClass - Checks that class which has only private ctors - is declared as final.
FinalLocalVariable - Ensures that local variables that never get their values changed, - must be declared final.
FinalParametersCheck that method/constructor/catch/foreach parameters are final.
GenericWhitespaceChecks that the whitespace around the Generic tokens < and > are - correct to the typical convention.
HeaderChecks the header of the source against a fixed header file.
HiddenFieldChecks that a local variable or a parameter does not shadow - a field that is defined in the same class.
HideUtilityClassConstructorMake sure that utility classes (classes that contain only static methods) - do not have a public constructor.
IllegalCatchCatching java.lang.Exception, java.lang.Error or java.lang.RuntimeException - is almost never acceptable.
IllegalImport - Checks for imports from a set of illegal packages.
IllegalInstantiation - Checks for illegal instantiations where a factory method is preferred.
IllegalThrowsThrowing java.lang.Error or java.lang.RuntimeException - is almost never acceptable.
IllegalToken - Checks for illegal tokens.
IllegalTokenText - Checks for illegal token text.
IllegalType - Checks that particular class are never used as types in variable - declarations, return values or parameters.
ImportControlCheck that controls what packages can be imported in each package.
ImportOrderEnsures that groups of imports come in a specific order.
IndentationChecks correct indentation of Java Code.
InnerAssignment - Checks for assignments in subexpressions, such as in - String s = Integer.toString(i = 2);.
InnerTypeLast - Check nested (internal) classes/interfaces are declared at the bottom of the - class after all method and field declarations.
InterfaceIsTypeImplements Bloch, Effective Java, Item 17 - - Use Interfaces only to define types.
InterfaceTypeParameterName - Checks that interface type parameter names conform to a format specified - by the format property.
JavaNCSSThis check calculates the Non Commenting Source Statements (NCSS) metric for - Java source files and methods.
JavadocMethodChecks the Javadoc of a method or constructor.
JavadocPackageChecks that all packages have a package documentation.
JavadocTagContinuationIndentationChecks the indentation of the continuation lines in at-clauses.
JavadocParagraphChecks Javadoc paragraphs.
JavadocStyleCustom Checkstyle Check to validate Javadoc.
JavadocTypeChecks the Javadoc of a type.
JavadocVariableChecks that a variable has Javadoc comment.
LeftCurly - Checks the placement of left curly braces on types, methods and - other blocks: -
LineLengthChecks for long lines.
LocalFinalVariableName - Checks that local final variable names conform to a format specified - by the format property.
LocalVariableName - Checks that local, non-final variable names conform to a format specified - by the format property.
MagicNumber - Checks for magic numbers.
MemberName - Checks that instance variable names conform to a format specified - by the format property.
MethodCountChecks the number of methods declared in each type.
MethodLength - Checks for long methods.
MethodName - Checks that method names conform to a format specified - by the format property.
MethodParamPad - Checks the padding between the identifier of a method definition, - constructor definition, method call, or constructor invocation; - and the left parenthesis of the parameter list.
MethodTypeParameterName - Checks that class type parameter names conform to a format specified - by the format property.
MissingCtor - Checks that classes (except abstract one) define a ctor and don't rely - on the default one.
MissingDeprecated - This class is used to verify that both the -
MissingOverride - This class is used to verify that the
MissingSwitchDefault - Checks that switch statement has "default" clause.
ModifiedControlVariableCheck for ensuring that for loop control variables are not modified - inside the for block.
ModifierOrder - Checks that the order of modifiers conforms to the suggestions in the - - Java Language specification, sections 8.1.1, 8.3.1 and 8.4.3.
MultipleStringLiteralsChecks for multiple occurrences of the same string literal within a - single file.
MultipleVariableDeclarations - Checks that each variable declaration is in its own statement - and on its own line.
MutableException Ensures that exceptions (defined as any class name conforming - to some regular expression) are immutable.
NPathComplexityChecks the npath complexity against a specified limit (default = 200).
NeedBraces - Checks for braces around code blocks.
NestedForDepthRestricts nested for blocks to a specified depth (default = 1).
NestedIfDepthRestricts nested if-else blocks to a specified depth (default = 1).
NestedTryDepthRestricts nested try-catch-finally blocks to a specified depth (default = 1).
NewlineAtEndOfFile - Checks that there is a newline at the end of each file.
NoClone - Checks that the clone method is not overridden from the - Object class.
NoFinalizerChecks that no method having zero parameters is defined - using the name finalize.
NonEmptyAtclauseDescription - Checks that the at-clause tag is followed by description .
NoLineWrap - Checks that chosen statements are not line-wrapped.
NoWhitespaceAfter - Checks that there is no whitespace after a token.
NoWhitespaceBefore - Checks that there is no whitespace before a token.
OneStatementPerLineChecks there is only one statement per line.
OneTopLevelClassChecks that each top-level class, interfaces or enum resides in a source file of its own.
OperatorWrap - Checks line wrapping for operators.
OuterTypeFilenameChecks that the outer type name and the file name match.
OuterTypeNumberChecks for the number of defined types at the "outer" level.
OverloadMethodsDeclarationOrderChecks that overload methods are grouped together.
PackageAnnotationThis check makes sure that all package annotations are in the - package-info.java file.
PackageDeclarationEnsures there is a package declaration and (optionally) in the correct directory.
PackageName - Checks that package names conform to a format specified - by the format property.
ParameterAssignment - Disallow assignment of parameters.
ParameterName - Checks that parameter names conform to a format specified - by the format property.
ParameterNumber - Checks the number of parameters that a method or constructor has.
ParenPadChecks the padding of parentheses; that is whether a space is required - after a left parenthesis and before a right parenthesis, or such spaces are - forbidden, with the exception that it does - not check for padding of the right parenthesis at an empty for iterator.
RedundantImport - Checks for imports that are redundant.
RedundantModifierChecks for redundant modifiers in interface and annotation definitions.
Regexp - A check that makes sure that a specified pattern exists (or not) in the file.
RegexpHeaderChecks the header of the source against a header file that contains a -
RegexpMultilineImplementation of a check that looks that matches across multiple lines in - any file type.
RegexpSinglelineImplementation of a check that looks for a single line in any file type.
RegexpSinglelineJavaImplementation of a check that looks for a single line in Java files.
RequireThisChecks that code doesn't rely on the "this" default.
ReturnCount - Restricts return statements to a specified count (default = 2).
RightCurly - Checks the placement of right curly braces.
SeparatorWrap - Checks line wrapping with separators.
SingleLineJavadoc - Checks that a JavaDoc block which can fit on a single line and doesn't contain at-clauses
SimplifyBooleanExpression - Checks for overly complicated boolean expressions.
SimplifyBooleanReturn - Checks for overly complicated boolean return statements.
StaticVariableName - Checks that static, non-final variable names conform to a format specified - by the format property.
StringLiteralEqualityChecks that string literals are not used with - == or !=.
SummaryJavadoc - Checks that Javadoc summary sentence does not contain phrases that are not recommended to use.
SuperClone - Checks that an overriding clone() method invokes super.clone().
SuperFinalize - Checks that an overriding finalize() method invokes super.finalize().
SuppressWarnings - This check allows you to specify what warnings that -
SuppressWarningsHolder - This check allows for finding code that should not be reported by Checkstyle -
ThrowsCount - Restricts throws statements to a specified count (default = 1).
TodoComment - A check for TODO comments.
TrailingComment - The check to ensure that requires that comments be the only thing on a line.
Translation - The TranslationCheck class helps to ensure the correct translation of code by - checking property files for consistency regarding their keys.
TypeName - Checks that type names conform to a format specified - by the format property.
TypecastParenPadChecks the padding of parentheses for typecasts.
UncommentedMainDetects uncommented main methods.
UniquePropertiesDetects duplicated keys in properties files.
UnnecessaryParentheses - Checks if unnecessary parentheses are used in a statement or expression.
UnusedImports - Checks for unused import statements.
UpperEllChecks that long constants are defined with an upper ell.
VariableDeclarationUsageDistanceChecks the distance between declaration of variable and its first usage.
VisibilityModifierChecks visibility of class members.
WhitespaceAfter - Checks that a token is followed by whitespace, with the exception that it - does not check for whitespace after the semicolon of an empty for iterator.
WhitespaceAround - Checks that a token is surrounded by whitespace.
WriteTag - Outputs a JavaDoc tag as information.
-
- -
diff --git a/src/xdocs/checks.xml b/src/xdocs/checks.xml index ae5d5ffe8..032299b54 100644 --- a/src/xdocs/checks.xml +++ b/src/xdocs/checks.xml @@ -558,6 +558,10 @@ OuterTypeNumber Checks for the number of defined types at the "outer" level. + + OverloadMethodsDeclarationOrder + Checks that overload methods are grouped together. + PackageAnnotation This check makes sure that all package annotations are in the