Package | Description |
---|---|
com.puppycrawl.tools.checkstyle |
Contains the implementation of the Checkstyle framework.
|
com.puppycrawl.tools.checkstyle.api |
Contains the core API to be used to implement checks.
|
com.puppycrawl.tools.checkstyle.checks |
Contains the checks that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.annotation |
Contains the Annotation checks that are
bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.blocks |
Contains the Block 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.header |
File Header checks.
|
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.modifier |
Contains the modifier checks that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.checks.naming |
Contains the Naming conventions 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.
|
com.puppycrawl.tools.checkstyle.filefilters |
Contains the before execution file filters that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.filters |
Contains the filters that are bundled with the main distribution.
|
Modifier and Type | Class and Description |
---|---|
class |
Checker
This class provides the functionality to check a set of files.
|
class |
DefaultLogger
Simple plain logger for text output.
|
class |
TreeWalker
Responsible for walking an abstract syntax tree and notifying interested
checks at each each node.
|
class |
XMLLogger
Simple XML logger.
|
Modifier and Type | Interface and Description |
---|---|
interface |
FileSetCheck
Interface for Checking a set of files for some criteria.
|
interface |
RootModule
The first module that is run as part of Checkstyle and controls its entire
behavior and children.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractCheck
The base class for checks.
|
class |
AbstractFileSetCheck
Provides common functionality for many FileSetChecks.
|
class |
AbstractViolationReporter
Serves as an abstract base class for all modules that report inspection
findings.
|
class |
AutomaticBean
A Java Bean that implements the component lifecycle interfaces by
calling the bean's setters for all configuration attributes.
|
Modifier and Type | Class and Description |
---|---|
class |
ArrayTypeStyleCheck
Checks the style of array type definitions.
|
class |
AvoidEscapedUnicodeCharactersCheck
Restrict using
Unicode escapes (such as
\u221e ). |
class |
DescendantTokenCheck
Checks for restricted tokens beneath other tokens.
|
class |
FinalParametersCheck
Check that method/constructor/catch/foreach parameters are final.
|
class |
NewlineAtEndOfFileCheck
Checks that there is a newline at the end of each file.
|
class |
OuterTypeFilenameCheck
Checks that the outer type name and the file name match.
|
class |
SuppressWarningsHolder
Maintains a set of check suppressions from
SuppressWarnings
annotations. |
class |
TodoCommentCheck
A check for 'TODO:' comments.
|
class |
TrailingCommentCheck
The check to ensure that comments are the only thing on a line.
|
class |
TranslationCheck
The TranslationCheck class helps to ensure the correct translation of code by
checking locale-specific resource files for consistency regarding their keys.
|
class |
UncommentedMainCheck
Detects uncommented main methods.
|
class |
UniquePropertiesCheck
Checks the uniqueness of property keys (left from equal sign) in the
properties file.
|
class |
UpperEllCheck
Checks that long constants are defined with an upper ell.
|
Modifier and Type | Class and Description |
---|---|
class |
AnnotationLocationCheck
Check location of annotation on language elements.
|
class |
AnnotationOnSameLineCheck
The check does verifying that annotations are located on the same line with their targets.
|
class |
AnnotationUseStyleCheck
This check controls the style with the usage of annotations.
|
class |
MissingDeprecatedCheck
This class is used to verify that both the
Deprecated annotation
and the deprecated javadoc tag are present when
either one is present. |
class |
MissingOverrideCheck
This class is used to verify that the
Override
annotation is present when the inheritDoc javadoc tag is present. |
class |
PackageAnnotationCheck
This check makes sure that all package annotations are in the
package-info.java file.
|
class |
SuppressWarningsCheck
This check allows you to specify what warnings that
SuppressWarnings is not
allowed to suppress. |
Modifier and Type | Class and Description |
---|---|
class |
AvoidNestedBlocksCheck
Finds nested blocks.
|
class |
EmptyBlockCheck
Checks for empty blocks.
|
class |
EmptyCatchBlockCheck
Checks for empty catch blocks.
|
class |
LeftCurlyCheck
Checks the placement of left curly braces on types, methods and
other blocks:
LITERAL_CATCH , LITERAL_DO , LITERAL_ELSE , LITERAL_FINALLY , LITERAL_FOR , LITERAL_IF , LITERAL_SWITCH , LITERAL_SYNCHRONIZED , LITERAL_TRY , LITERAL_WHILE , STATIC_INIT ,
LAMBDA . |
class |
NeedBracesCheck
Checks for braces around code blocks.
|
class |
RightCurlyCheck
Checks the placement of right curly braces.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractSuperCheck
Abstract class for checking that an overriding method with no parameters
invokes the super method.
|
class |
ArrayTrailingCommaCheck
Checks if array initialization contains optional trailing comma.
|
class |
AvoidInlineConditionalsCheck
Detects inline conditionals.
|
class |
CovariantEqualsCheck
Checks that if a class defines a covariant method equals,
then it defines method equals(java.lang.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 |
DefaultComesLastCheck
Check that the
default is after all the case s
in a switch statement. |
class |
EmptyStatementCheck
Detects empty statements (standalone ';').
|
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 |
ExplicitInitializationCheck
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 . |
class |
FallThroughCheck
Checks for fall through in switch statements
Finds locations where a case contains Java code -
but lacks a break, return, throw or continue statement.
|
class |
FinalLocalVariableCheck
Ensures that local variables that never get their values changed,
must be 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 |
IllegalCatchCheck
Catching java.lang.Exception, java.lang.Error or java.lang.RuntimeException
is almost never acceptable.
|
class |
IllegalInstantiationCheck
Checks for illegal instantiations where a factory method is preferred.
|
class |
IllegalThrowsCheck
Throwing java.lang.Error or java.lang.RuntimeException
is almost never acceptable.
|
class |
IllegalTokenCheck
Checks for illegal tokens.
|
class |
IllegalTokenTextCheck
Checks for illegal token text.
|
class |
IllegalTypeCheck
Checks that particular class are never used as types in variable
declarations, return values or parameters.
|
class |
InnerAssignmentCheck
Checks for assignments in subexpressions, such as in
String s = Integer.toString(i = 2); . |
class |
MagicNumberCheck
Checks that there are no
"magic numbers" where a magic
number is a numeric literal that is not defined as a constant.
|
class |
MissingCtorCheck
Checks that classes (except abstract one) define a ctor and don't rely
on the default one.
|
class |
MissingSwitchDefaultCheck
Checks that switch statement has "default" clause.
|
class |
ModifiedControlVariableCheck
Check for ensuring 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 |
MultipleVariableDeclarationsCheck
Checks that each variable declaration is in its own statement
and on its own line.
|
class |
NestedForDepthCheck
Check the number of nested
for -statements. |
class |
NestedIfDepthCheck
Restricts nested if-else blocks to a specified depth (default = 1).
|
class |
NestedTryDepthCheck
Restricts nested try-catch-finally blocks to a specified depth (default = 1).
|
class |
NoCloneCheck
Checks that the clone method is not overridden from the
Object class.
|
class |
NoFinalizerCheck
Checks that no method having zero parameters is defined
using the name finalize.
|
class |
OneStatementPerLineCheck
Restricts the number of statements per line to one.
|
class |
OverloadMethodsDeclarationOrderCheck
Checks that overload methods are grouped together.
|
class |
PackageDeclarationCheck
Ensures there is a package declaration.
|
class |
ParameterAssignmentCheck
Disallow assignment of parameters.
|
class |
RequireThisCheck
Checks that code doesn't rely on the "this" default.
|
class |
ReturnCountCheck
Restricts the number of return statements in methods, constructors and lambda expressions
(2 by default).
|
class |
SimplifyBooleanExpressionCheck
Checks for overly complicated boolean expressions.
|
class |
SimplifyBooleanReturnCheck
Checks for overly complicated boolean return statements.
|
class |
StringLiteralEqualityCheck
Checks that string literals are not used with
== or != . |
class |
SuperCloneCheck
Checks that an overriding clone() method invokes super.clone().
|
class |
SuperFinalizeCheck
Checks that an overriding finalize() method invokes super.finalize().
|
class |
UnnecessaryParenthesesCheck
Checks if unnecessary parentheses are used in a statement or expression.
|
class |
VariableDeclarationUsageDistanceCheck
Checks the distance between declaration of variable and its first usage.
|
Modifier and Type | Class and Description |
---|---|
class |
DesignForExtensionCheck
The check finds classes that are designed for extension (subclass creation).
|
class |
FinalClassCheck
Checks that class which has only private ctors
is declared as final.
|
class |
HideUtilityClassConstructorCheck
Make sure that utility classes (classes that contain only static methods)
do not have a public constructor.
|
class |
InnerTypeLastCheck
Check nested (internal) classes/interfaces are declared at the bottom of the
class after all method and field declarations.
|
class |
InterfaceIsTypeCheck
Implements Bloch, Effective Java, Item 17 -
Use Interfaces only to define types.
|
class |
MutableExceptionCheck
Ensures that exceptions (classes with names conforming to some regular
expression and explicitly extending classes with names conforming to other
regular expression) are immutable.
|
class |
OneTopLevelClassCheck
Checks that each top-level class, interface
or enum resides in a source file of its own.
|
class |
ThrowsCountCheck
Restricts throws statements to a specified count (default = 4).
|
class |
VisibilityModifierCheck
Checks visibility of class members.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractHeaderCheck
Abstract super class for header checks.
|
class |
HeaderCheck
Checks the header of the source against a fixed header file.
|
class |
RegexpHeaderCheck
Checks the header of the source against a header file that contains a
regular expression
for each line of the source header. |
Modifier and Type | Class and Description |
---|---|
class |
AvoidStarImportCheck
Check that finds import statements that use the * notation.
|
class |
AvoidStaticImportCheck
Check that finds static imports.
|
class |
CustomImportOrderCheck
Checks that the groups of import declarations appear in the order specified
by the user.
|
class |
IllegalImportCheck
Checks for imports from a set of illegal packages.
|
class |
ImportControlCheck
Check that controls what packages can be imported in each package.
|
class |
ImportOrderCheck
Checks the ordering/grouping of imports.
|
class |
RedundantImportCheck
Checks for imports that are redundant.
|
class |
UnusedImportsCheck
Checks for unused import statements.
|
Modifier and Type | Class and Description |
---|---|
class |
CommentsIndentationCheck
This Check controls the indentation between comments and surrounding code.
|
class |
IndentationCheck
Checks correct indentation of Java Code.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractJavadocCheck
Base class for Checks that process Javadoc comments.
|
class |
AbstractTypeAwareCheck
Deprecated.
Checkstyle is not type aware tool and all Checks derived from this
class are potentially unstable.
|
class |
AtclauseOrderCheck
Checks the order of
javadoc block-tags or javadoc tags.
|
class |
JavadocMethodCheck
Checks the Javadoc of a method or constructor.
|
class |
JavadocPackageCheck
Checks that all packages have a package documentation.
|
class |
JavadocParagraphCheck
Checks that:
There is one blank line between each of two paragraphs
and one blank line before the at-clauses block if it is present.
Each paragraph but the first has <p> immediately
before the first word, with no space after.
|
class |
JavadocStyleCheck
Custom Checkstyle Check to validate Javadoc.
|
class |
JavadocTagContinuationIndentationCheck
Checks the indentation of the continuation lines in at-clauses.
|
class |
JavadocTypeCheck
Checks the Javadoc of a type.
|
class |
JavadocVariableCheck
Checks that a variable has Javadoc comment.
|
class |
NonEmptyAtclauseDescriptionCheck
Checks that the at-clause tag is followed by description .
|
class |
SingleLineJavadocCheck
Checks that a JavaDoc block can fit on a single line and doesn't
contain at-clauses.
|
class |
SummaryJavadocCheck
Checks that
Javadoc summary sentence does not contain phrases that are not recommended to use.
|
class |
WriteTagCheck
Outputs a JavaDoc tag as information.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractClassCouplingCheck
Base class for coupling calculation.
|
class |
BooleanExpressionComplexityCheck
Restricts nested boolean operators (&&, ||, &, | and ^) to
a specified depth (default = 3).
|
class |
ClassDataAbstractionCouplingCheck
This metric measures the number of instantiations of other classes
within the given class.
|
class |
ClassFanOutComplexityCheck
The number of other classes a given class relies on.
|
class |
CyclomaticComplexityCheck
Checks cyclomatic complexity against a specified limit.
|
class |
JavaNCSSCheck
This check calculates the Non Commenting Source Statements (NCSS) metric for
java source files and methods.
|
class |
NPathComplexityCheck
Checks the npath complexity against a specified limit (default = 200).
|
Modifier and Type | Class and Description |
---|---|
class |
ModifierOrderCheck
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.
|
class |
RedundantModifierCheck
Checks for redundant modifiers in interface and annotation definitions,
final modifier on methods of final classes, inner
interface
declarations that are declared as static , non public class
constructors and enum constructors, nested enum definitions that are declared
as static . |
Modifier and Type | Class and Description |
---|---|
class |
AbbreviationAsWordInNameCheck
The Check validate abbreviations(consecutive capital letters) length in
identifier name, it also allows to enforce camel case naming.
|
class |
AbstractAccessControlNameCheck
Abstract class for checking a class member (field/method)'s name conforms to
a format specified by the format property.
|
class |
AbstractClassNameCheck
Ensures that the names of abstract classes conforming to some
regular expression and check that
abstract modifier exists. |
class |
AbstractNameCheck
Abstract class for checking that names conform to a specified format.
|
class |
AbstractTypeParameterNameCheck
Deprecated.
Checkstyle will not support abstract checks anymore. Use
AbstractNameCheck instead. |
class |
CatchParameterNameCheck
Checks that
catch parameter names conform to a format specified by the format property. |
class |
ClassTypeParameterNameCheck
Checks that class type parameter names conform to a format specified
by the format property.
|
class |
ConstantNameCheck
Checks that constant names conform to a format specified
by the format property.
|
class |
InterfaceTypeParameterNameCheck
Checks that interface type parameter names conform to a format specified
by the format property.
|
class |
LocalFinalVariableNameCheck
Checks that local final variable names conform to a format specified
by the format property.
|
class |
LocalVariableNameCheck
Checks that local, non-final variable names conform to a format specified
by the format property.
|
class |
MemberNameCheck
Checks that instance variable names conform to a format specified
by the format property.
|
class |
MethodNameCheck
Checks that method names conform to a format specified
by the format property.
|
class |
MethodTypeParameterNameCheck
Checks that class type parameter names conform to a format specified
by the format property.
|
class |
PackageNameCheck
Checks that package names conform to a format specified
by the format property.
|
class |
ParameterNameCheck
Checks that method and
catch parameter names conform to a format specified
by the format property. |
class |
StaticVariableNameCheck
Checks that static, non-final variable names conform to a format specified
by the format property.
|
class |
TypeNameCheck
Checks that type names conform to a format specified
by the format property.
|
Modifier and Type | Class and Description |
---|---|
class |
RegexpCheck
A check that makes sure that a specified pattern exists (or not) in the file.
|
class |
RegexpMultilineCheck
Implementation of a check that looks that matches across multiple lines in
any file type.
|
class |
RegexpOnFilenameCheck
Implementation of a check that looks for a file name and/or path match (or
mis-match) against specified patterns.
|
class |
RegexpSinglelineCheck
Implementation of a check that looks for a single line in any file type.
|
class |
RegexpSinglelineJavaCheck
Implementation of a check that looks for a single line in Java files.
|
Modifier and Type | Class and Description |
---|---|
class |
AnonInnerLengthCheck
Checks for long anonymous inner classes.
|
class |
ExecutableStatementCountCheck
Restricts the number of executable statements to a specified limit
(default = 30).
|
class |
FileLengthCheck
Checks for long source files.
|
class |
LineLengthCheck
Checks for long lines.
|
class |
MethodCountCheck
Checks the number of methods declared in each type declaration by access
modifier or total count.
|
class |
MethodLengthCheck
Checks for long methods.
|
class |
OuterTypeNumberCheck
Checks for the number of defined types at the "outer" level.
|
class |
ParameterNumberCheck
Checks the number of parameters that a method or constructor has.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractParenPadCheck
Abstract class for checking the padding of parentheses.
|
class |
EmptyForInitializerPadCheck
Checks the padding of an empty for initializer; that is whether a
space is required at an empty for initializer, or such spaces are
forbidden.
|
class |
EmptyForIteratorPadCheck
Checks the padding of an empty for iterator; that is whether a
space is required at an empty for iterator, or such spaces are
forbidden.
|
class |
EmptyLineSeparatorCheck
Checks for empty line separators after header, package, all import declarations,
fields, constructors, methods, nested classes,
static initializers and instance initializers.
|
class |
FileTabCharacterCheck
Checks to see if a file contains a tab character.
|
class |
GenericWhitespaceCheck
Checks that the whitespace around the Generic tokens (angle brackets)
"<" and ">" are correct to the typical convention.
|
class |
MethodParamPadCheck
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.
|
class |
NoLineWrapCheck
Checks that chosen statements are not line-wrapped.
|
class |
NoWhitespaceAfterCheck
Checks that there is no whitespace after a token.
|
class |
NoWhitespaceBeforeCheck
Checks that there is no whitespace before a token.
|
class |
OperatorWrapCheck
Checks line wrapping for operators.
|
class |
ParenPadCheck
Checks 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.
|
class |
SeparatorWrapCheck
Checks line wrapping with separators.
|
class |
SingleSpaceSeparatorCheck
Checks that non-whitespace characters are separated by no more than one
whitespace.
|
class |
TypecastParenPadCheck
Checks the padding of parentheses for typecasts.
|
class |
WhitespaceAfterCheck
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.
|
class |
WhitespaceAroundCheck
Checks that a token is surrounded by whitespace.
|
Modifier and Type | Class and Description |
---|---|
class |
BeforeExecutionExclusionFileFilter
File filter
BeforeExecutionExclusionFileFilter decides which files should be
excluded from being processed by the utility. |
Modifier and Type | Class and Description |
---|---|
class |
SeverityMatchFilter
This is a very simple filter based on severity matching.
|
class |
SuppressionCommentFilter
A filter that uses comments to suppress audit events.
|
class |
SuppressionFilter
This filter accepts AuditEvents according to file, check, line, and
column, as specified in a suppression file.
|
class |
SuppressionXpathFilter
This filter accepts TreeWalkerAuditEvents according to file, check and xpath query,
as specified in a suppression file.
|
class |
SuppressWarningsFilter
A filter that suppresses warnings using the
SuppressWarnings
annotation. |
class |
SuppressWithNearbyCommentFilter
A filter that uses nearby comments to suppress audit events.
|
class |
SuppressWithPlainTextCommentFilter
A filter that uses comments to suppress audit events.
|
Copyright © 2001–2018. All rights reserved.