Package | Description |
---|---|
com.puppycrawl.tools.checkstyle |
Contains the implementation of the Checkstyle framework.
|
com.puppycrawl.tools.checkstyle.checks |
Contains the checks that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.coding |
Contains the Coding checks that are
bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.design |
Contains the Class Design checks that
are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.imports |
Contains the Imports checks that are
bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.indentation |
Contains all classes required for the
indentation check.
|
com.puppycrawl.tools.checkstyle.checks.javadoc |
Contains the Javadoc checks that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.metrics |
Contains the Metrics checks that are
bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.regexp |
Contains the regular expression checks that are bundled with the main
distribution.
|
com.puppycrawl.tools.checkstyle.checks.sizes |
Contains the Size Violations checks
that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.whitespace |
Contains the Whitespace checks that
are bundled with the main distribution.
|
Modifier and Type | Class and Description |
---|---|
class |
TreeWalker
Responsible for walking an abstract syntax tree and notifying interested
checks at each each node.
|
Modifier and Type | Class and Description |
---|---|
class |
AvoidEscapedUnicodeCharactersCheck
Restricts using
Unicode escapes
(such as \u221e).
|
class |
DescendantTokenCheck
Checks for restricted tokens beneath other tokens.
|
class |
OuterTypeFilenameCheck
Checks that the outer type name and the file name match.
|
class |
UncommentedMainCheck
Detects uncommented
main methods. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractSuperCheck
Abstract class for checking that an overriding method with no parameters
invokes the super method.
|
class |
CovariantEqualsCheck
Checks that classes which define a covariant
equals() method
also override method equals(Object) . |
class |
DeclarationOrderCheck
Checks that the parts of a class or interface declaration appear in the order
suggested by the
Code Conventions for the Java Programming Language.
|
class |
EqualsAvoidNullCheck
Checks that any combination of String literals
is on the left side of an
equals() comparison. |
class |
EqualsHashCodeCheck
Checks that classes that either override
equals() or hashCode() also
overrides the other. |
class |
FinalLocalVariableCheck
Checks that local variables that never have their values changed are declared final.
|
class |
HiddenFieldCheck
Checks that a local variable or a parameter does not shadow
a field that is defined in the same class.
|
class |
IllegalInstantiationCheck
Checks for illegal instantiations where a factory method is preferred.
|
class |
IllegalTypeCheck
Checks that particular classes or interfaces are never used.
|
class |
ModifiedControlVariableCheck
Checks that for loop control variables are not modified
inside the for block.
|
class |
MultipleStringLiteralsCheck
Checks for multiple occurrences of the same string literal within a single file.
|
class |
NestedForDepthCheck
Restricts nested
for blocks to a specified depth. |
class |
NestedIfDepthCheck
Restricts nested if-else blocks to a specified depth.
|
class |
NestedTryDepthCheck
Restricts nested try-catch-finally blocks to a specified depth.
|
class |
OneStatementPerLineCheck
Checks that there is only one statement per line.
|
class |
PackageDeclarationCheck
Ensures that a class has a package declaration, and (optionally) whether
the package name matches the directory name for the source file.
|
class |
ParameterAssignmentCheck
Disallows assignment of parameters.
|
class |
RequireThisCheck
Checks that references to instance variables and methods of the present
object are explicitly of the form "this.varName" or "this.methodName(args)"
and that those references don't rely on the default behavior when "this." is absent.
|
class |
ReturnCountCheck
Restricts the number of return statements in methods, constructors and lambda expressions.
|
class |
UnnecessaryParenthesesCheck
Checks if unnecessary parentheses are used in a statement or expression.
|
Modifier and Type | Class and Description |
---|---|
class |
FinalClassCheck
Checks that a class which has only private constructors
is declared as final.
|
class |
InnerTypeLastCheck
Checks nested (internal) classes/interfaces are declared at the bottom of the
primary (top-level) class after all method and field declarations.
|
class |
MutableExceptionCheck
Ensures that exception classes (classes with names conforming to some regular
expression and explicitly extending classes with names conforming to other
regular expression) are immutable, that is, that they have only final fields.
|
class |
VisibilityModifierCheck
Checks visibility of class members.
|
Modifier and Type | Class and Description |
---|---|
class |
CustomImportOrderCheck
Checks that the groups of import declarations appear in the order specified
by the user.
|
class |
ImportControlCheck
Controls what can be imported in each package and file.
|
class |
ImportOrderCheck
Checks the ordering/grouping of imports.
|
class |
RedundantImportCheck
Checks for redundant import statements.
|
class |
UnusedImportsCheck
Checks for unused import statements.
|
Modifier and Type | Class and Description |
---|---|
class |
IndentationCheck
Checks correct indentation of Java code.
|
Modifier and Type | Class and Description |
---|---|
class |
JavadocMethodCheck
Checks the Javadoc of a method or constructor.
|
class |
MissingJavadocMethodCheck
Checks for missing Javadoc comments for a method or constructor.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractClassCouplingCheck
Base class for coupling calculation.
|
class |
BooleanExpressionComplexityCheck
Restricts the number of boolean operators (
&& , || ,
& , | and ^ ) in an expression. |
class |
CyclomaticComplexityCheck
Checks cyclomatic complexity against a specified limit.
|
class |
JavaNCSSCheck
Determines complexity of methods, classes and files by counting
the Non Commenting Source Statements (NCSS).
|
class |
NPathComplexityCheck
Checks the NPATH complexity against a specified limit.
|
Modifier and Type | Class and Description |
---|---|
class |
RegexpCheck
Checks that a specified pattern exists, exists less than
a set number of times, or does not exist in the file.
|
Modifier and Type | Class and Description |
---|---|
class |
ExecutableStatementCountCheck
Restricts the number of executable statements to a specified limit.
|
class |
MethodCountCheck
Checks the number of methods declared in each type declaration by access modifier
or total count.
|
class |
OuterTypeNumberCheck
Checks for the number of types declared at the outer (or root) level in a file.
|
Modifier and Type | Class and Description |
---|---|
class |
GenericWhitespaceCheck
Checks that the whitespace around the Generic tokens (angle brackets)
"<" and ">" are correct to the typical convention.
|
Copyright © 2001–2020. All rights reserved.