Uses of Class
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
Package
Description
Contains the implementation of the Checkstyle framework.
Contains the core API to be used to implement checks.
Contains the checks that are bundled with the main distribution.
Contains the Annotation checks that are
bundled with the main distribution.
Contains the Block checks that are
bundled with the main distribution.
Contains the Coding checks that are
bundled with the main distribution.
Contains the Class Design checks that
are bundled with the main distribution.
File Header checks.
Contains the Imports checks that are
bundled with the main distribution.
Contains all classes required for the
indentation check.
Contains the Javadoc checks that are bundled with the main distribution.
Contains the Metrics checks that are
bundled with the main distribution.
Contains the modifier checks that are bundled with the main distribution.
Contains the Naming conventions checks
that are bundled with the main distribution.
Contains the regular expression checks that are bundled with the main
distribution.
Contains the Size Violations checks
that are bundled with the main distribution.
Contains the Whitespace checks that
are bundled with the main distribution.
Contains module metadata generation classes for checkstyle.
Contains classes for generating the Checkstyle website.
-
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle
Modifier and TypeClassDescriptionfinal class
Responsible for walking an abstract syntax tree and notifying interested checks at each node. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.api
Modifier and TypeClassDescriptionclass
The base class for checks.class
Provides common functionality for many FileSetChecks. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks
Modifier and TypeClassDescriptionclass
Checks the style of array type definitions.class
Restricts using Unicode escapes (such as \u221e).class
Checks for restricted tokens beneath other tokens.class
Checks that parameters for methods, constructors, catch and for-each blocks are final.class
Checks whether files end with a line separator.class
Checks whether file contains code.class
Detects if keys in properties files are in correct order.class
Checks that the outer type name and the file name match.class
Maintains a set of check suppressions from@SuppressWarnings
annotations.class
Checks forTODO:
comments.class
The check to ensure that lines with code do not end with comment.class
Ensures the correct translation of code by checking property files for consistency regarding their keys.class
Detects uncommentedmain
methods.class
Detects duplicated keys in properties files.class
Checks that long constants are defined with an upper ell. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.annotation
Modifier and TypeClassDescriptionclass
Checks location of annotation on language elements.class
Checks that annotations are located on the same line with their targets.final class
Checks the style of elements in annotations.final class
Verifies that the annotation@Deprecated
and the Javadoc tag@deprecated
are both present when either of them is present.final class
Verifies that the@Override
annotation is present when the@inheritDoc
javadoc tag is present.class
Checks that all package annotations are in the package-info.java file.class
Allows to specify what warnings that@SuppressWarnings
is not allowed to suppress. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.blocks
Modifier and TypeClassDescriptionclass
Finds nested blocks (blocks that are used freely in the code).class
Checks for empty blocks.class
Checks for empty catch blocks.class
Checks for the placement of left curly braces ('{'
) for code blocks.class
Checks for braces around code blocks.class
Checks the placement of right curly braces ('}'
) for code blocks. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.coding
Modifier and TypeClassDescriptionclass
Abstract class for checking that an overriding method with no parameters invokes the super method.class
Checks that array initialization contains a trailing comma.class
Detects double brace initialization.class
Detects inline conditionals.final class
Checks if call to superclass constructor without arguments is present.class
Checks that all constructors are grouped together.class
Checks that classes and records which define a covariantequals()
method also override methodequals(Object)
.class
Checks that the parts of a class, record, or interface declaration appear in the order suggested by the Code Conventions for the Java Programming Language.class
Check that thedefault
is after all the cases in aswitch
statement.class
Detects empty statements (standalone";"
semicolon).class
Checks that any combination of String literals is on the left side of anequals()
comparison.class
Checks that classes that either overrideequals()
orhashCode()
also overrides the other.class
Checks if any class or object member is explicitly initialized to default for its type value (null
for object references, zero for numeric types andchar
andfalse
forboolean
.class
Checks for fall-through inswitch
statements.class
Checks that local variables that never have their values changed are declared final.class
Checks that a local variable or a parameter does not shadow a field that is defined in the same class.final class
Checks that certain exception types do not appear in acatch
statement.class
Checks for illegal instantiations where a factory method is preferred.final class
Checks that specified types are not declared to be thrown.class
Checks for illegal tokens.class
Checks specified tokens text for matching an illegal pattern.final class
Checks that particular classes or interfaces are never used.class
Checks for assignments in subexpressions, such as inString s = Integer.toString(i = 2);
.class
Checks that there are no "magic numbers" where a magic number is a numeric literal that is not defined as a constant.class
Evaluates Xpath query and report violation on all matching AST nodes.class
Checks that classes (except abstract ones) define a constructor and don't rely on the default one.class
Checks that a given switch statement or expression that use a reference type in its selector expression has anull
case label.class
Checks that switch statement has adefault
clause.final class
Checks that for loop control variables are not modified inside the for block.class
Checks for multiple occurrences of the same string literal within a single file.class
Checks that each variable declaration is in its own statement and on its own line.final class
Restricts nestedfor
blocks to a specified depth.final class
Restricts nested if-else blocks to a specified depth.final class
Restricts nested try-catch-finally blocks to a specified depth.class
Checks that array initialization do not contain a trailing comma.class
Checks that the clone method is not overridden from the Object class.class
Checks that enum definition does not contain a trailing comma.class
Checks that there is no methodfinalize
with zero parameters.final class
Checks that there is only one statement per line.class
Checks that overloaded methods are grouped together.final class
Ensures that a class has a package declaration, and (optionally) whether the package name matches the directory name for the source file.final class
Disallows assignment of parameters.class
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.final class
Restricts the number of return statements in methods, constructors and lambda expressions.class
Checks for over-complicated boolean expressions.class
Checks for over-complicated boolean return or yield statements.class
Checks that string literals are not used with==
or!=
.class
Checks that an overridingclone()
method invokessuper.clone()
.class
Checks that an overridingfinalize()
method invokessuper.finalize()
.class
Checks if unnecessary parentheses are used in a statement or expression.final class
Checks if unnecessary semicolon is used after type declaration.final class
Checks if unnecessary semicolon is used after type member declaration.final class
Checks if unnecessary semicolon is in enum definitions.final class
Checks if unnecessary semicolon is used in last resource declaration.class
Ensures that catch parameters that are not used are declared as an unnamed variable.class
Ensures that lambda parameters that are not used are declared as an unnamed variable.class
Checks that a local variable is declared and/or assigned, but not used.class
Checks the distance between declaration of variable and its first usage.class
Ensures thatwhen
is used instead of a singleif
statement inside a case block. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.design
Modifier and TypeClassDescriptionclass
Checks that classes are designed for extension (subclass creation).class
Ensures that identifies classes that can be effectively declared as final are explicitly marked as final.class
Makes sure that utility classes (classes that contain only static methods or fields in their API) do not have a public constructor.class
Checks nested (internal) classes/interfaces are declared at the bottom of the primary (top-level) class after all init and static init blocks, method, constructor and field declarations.final class
Implements Joshua Bloch, Effective Java, Item 17 - Use Interfaces only to define types.final class
Ensures that exception classes (classes with names conforming to some pattern and explicitly extending classes with names conforming to other pattern) are immutable, that is, that they have only final fields.class
Checks that each top-level class, interface, enum or annotation resides in a source file of its own.class
Checks that sealed classes and interfaces have a permits list.final class
Restricts throws statements to a specified count.class
Checks visibility of class members. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.header
Modifier and TypeClassDescriptionclass
Abstract super class for header checks.class
Checks that a source file begins with a specified header.class
Checks the header of a source file against a header that contains a pattern for each line of the source header. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.imports
Modifier and TypeClassDescriptionclass
Checks that there are no import statements that use the*
notation.class
Checks that there are no static import statements.class
Checks that the groups of import declarations appear in the order specified by the user.class
Checks for imports from a set of illegal packages.class
Controls what can be imported in each package and file.class
Checks the ordering/grouping of imports.class
Checks for redundant import statements.class
Checks for unused import statements. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.indentation
Modifier and TypeClassDescriptionclass
Controls the indentation between comments and surrounding code.class
Checks correct indentation of Java code. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.javadoc
Modifier and TypeClassDescriptionclass
Base class for Checks that process Javadoc comments.class
Checks the order of javadoc block-tags or javadoc tags.class
Checks that Javadocs are located at the correct position.class
Checks that a javadoc block tag appears only at the beginning of a line, ignoring leading asterisks and white space.class
Checks that the Javadoc content begins from the same position for all Javadoc comments in the project.class
Checks the alignment of leading asterisks in a Javadoc comment.class
Checks the Javadoc of a method or constructor.class
Checks if the javadoc has leading asterisks on each line.class
Checks that there is at least one whitespace after the leading asterisk.class
Checks that each Java package has a Javadoc file used for commenting.class
Checks the Javadoc paragraph.class
Validates Javadoc comments to help ensure they are well formed.class
Checks the indentation of the continuation lines in block tags.class
Checks the Javadoc comments for type definitions.class
Checks that a variable has a Javadoc comment.class
Checks for missing Javadoc comments for a method or constructor.class
Checks for missing package definition Javadoc comments in package-info.java files.class
Checks for missing Javadoc comments for class, enum, interface, and annotation interface definitions.class
Checks that the block tag is followed by description.class
Checks that one blank line before the block tag if it is present in Javadoc.class
Checks that a Javadoc block can fit in a single-line and doesn't contain block tags.class
Checks that Javadoc summary sentence does not contain phrases that are not recommended to use.class
Requires user defined Javadoc tag to be present in Javadoc comment with defined format. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.metrics
Modifier and TypeClassDescriptionclass
Base class for coupling calculation.final class
Restricts the number of boolean operators (&&
,||
,&
,|
and^
) in an expression.final class
Measures the number of distinct classes that are instantiated within the given class or record.final class
Checks the number of other types a given class/record/interface/enum/annotation relies on.class
Checks cyclomatic complexity against a specified limit.class
Determines complexity of methods, classes and files by counting the Non Commenting Source Statements (NCSS).final class
Checks the NPATH complexity against a specified limit. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.modifier
Modifier and TypeClassDescriptionclass
Checks for implicit modifiers on nested types in classes and records.class
Checks for implicit modifiers on interface members and nested types.class
Checks that the order of modifiers conforms to the suggestions in the Java Language specification, § 8.1.1, 8.3.1, 8.4.3 and 9.4.class
Checks for redundant modifiers. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.naming
Modifier and TypeClassDescriptionclass
Validates abbreviations (consecutive capital letters) length in identifier name, it also allows to enforce camel case naming.class
Abstract class for checking a class member (field/method)'s name conforms to a specified pattern.final class
Ensures that the names of abstract classes conforming to some pattern and check thatabstract
modifier exists.class
Abstract class for checking that names conform to a specified format.class
Checks thatcatch
parameter names conform to a specified pattern.class
Checks that class type parameter names conform to a specified pattern.class
Checks that constant names conform to a specified pattern.class
Checks identifiers with a pattern for a set of illegal names, such as those that are restricted or contextual keywords.class
Checks that interface type parameter names conform to a specified pattern.class
Checks lambda parameter names.class
Checks that local final variable names conform to a specified pattern.class
Checks that local, non-final
variable names conform to a specified pattern.class
Checks that instance variable names conform to a specified pattern.class
Checks that method names conform to a specified pattern.class
Checks that method type parameter names conform to a specified pattern.class
Checks that package names conform to a specified pattern.class
Checks that method parameter names conform to a specified pattern.class
Checks that pattern variable names conform to a specified pattern.class
Checks that record component names conform to a specified pattern.class
Checks that record type parameter names conform to a specified pattern.class
Checks thatstatic
, non-final
variable names conform to a specified pattern.class
Checks that type names conform to a specified pattern. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.regexp
Modifier and TypeClassDescriptionclass
Checks that a specified pattern exists, exists less than a set number of times, or does not exist in the file.class
Checks that a specified pattern matches across multiple lines in any file type.class
Checks that a specified pattern matches based on file and/or folder path.class
Checks that a specified pattern matches a single-line in any file type.class
Checks that a specified pattern matches a single-line in Java files.Modifier and TypeFieldDescriptionprivate AbstractViolationReporter
DetectorOptions.reporter
Used for reporting violations.Modifier and TypeMethodDescriptionDetectorOptions.Builder.reporter
(AbstractViolationReporter val) Specifies the violation reporter and returns Builder object. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.sizes
Modifier and TypeClassDescriptionclass
Checks for long anonymous inner classes.final class
Restricts the number of executable statements to a specified limit.class
Checks for long source files.class
Checks lambda body length.class
Checks for long lines.final class
Checks the number of methods declared in each type declaration by access modifier or total count.class
Checks for long methods and constructors.class
Checks for the number of types declared at the outer (or root) level in a file.class
Checks the number of parameters of a method or constructor.class
Checks the number of record components in the header of a record definition. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.checks.whitespace
Modifier and TypeClassDescriptionclass
Abstract class for checking the padding of parentheses.class
Checks the padding of an empty for initializer; that is whether a white space is required at an empty for initializer, or such white space is forbidden.class
Checks the padding of an empty for iterator; that is whether a white space is required at an empty for iterator, or such white space is forbidden.class
Checks for empty line separators before package, all import declarations, fields, constructors, methods, nested classes, static initializers and instance initializers.class
Checks that there are no tab characters ('\t'
) in the source code.class
Checks that the whitespace around the Generic tokens (angle brackets) "<" and ">" are correct to the typical convention.class
Checks the padding between the identifier of a method definition, constructor definition, method call, constructor invocation, record, or record pattern; and the left parenthesis of the parameter list.class
Checks that chosen statements are not line-wrapped.class
Checks that there is no whitespace after a token.class
Checks that there is no whitespace before the colon in a switch block.class
Checks that there is no whitespace before a token.class
Checks the policy on how to wrap lines on operators.class
Checks the policy on 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
Checks line wrapping with separators.class
Checks that non-whitespace characters are separated by no more than one whitespace.class
Checks the policy on the padding of parentheses for typecasts.class
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
Checks that a token is surrounded by whitespace. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.meta
Modifier and TypeClassDescriptionclass
Class for scraping module metadata from the corresponding class' class-level javadoc. -
Uses of AbstractViolationReporter in com.puppycrawl.tools.checkstyle.site
Modifier and TypeClassDescriptionclass
Class for scraping class javadoc and all property setter javadocs from the given checkstyle module.