Showing 298 of 302 total issues
Empty line should be followed by <p> tag on the next line.</p> Open
*
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks the Javadoc paragraph.
Checks that:
- There is one blank line between each of two paragraphs.
- Each paragraph but the first has <p> immediately before the first word, withno space after.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'...' is preceded with whitespace. Open
@Nonnull DatapointType ...types) throws InvalidModelType {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there is no whitespace before a token. Morespecifically, it checks that it is not preceded with whitespace, or(if linebreaks are allowed) all characters on the line before arewhitespace. To allow linebreaks before a token, set propertyallowLineBreaks
to true
. No check occursbefore semi-colons in empty for loop initializers or conditions.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Empty line should be followed by <p> tag on the next line.</p> Open
*
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks the Javadoc paragraph.
Checks that:
- There is one blank line between each of two paragraphs.
- Each paragraph but the first has <p> immediately before the first word, withno space after.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Line is longer than 120 characters (found 121). Open
public static @Nonnull SortedSet<FieldContainer<Object>> pluckAll(@Nonnull Message instance, @Nonnull FieldMask mask) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for long lines.
Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'static' modifier out of order with the JLS suggestions. Open
protected final static @Nonnull MediaType HTML;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that the order of modifiers conforms to the suggestions inthe JavaLanguage specification, § 8.1.1, 8.3.1, 8.4.3 and9.4. The correct order is:
public
protected
private
abstract
default
static
final
transient
volatile
synchronized
native
strictfp
In additional, modifiers are checked to ensure all annotations aredeclared before all other modifiers.
Rationale: Code is easier to read if everybody follows a standard.
ATTENTION: We skiptype annotations from validation.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'{' at column 42 should have line break after. Open
public static Logger logger(Class cls) { return LoggerFactory.getLogger(cls.getName());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for the placement of left curly braces('{'
) for code blocks.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
WhitespaceAround: 'for' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) Open
for(BeanDefinition definition : definitions) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that a token is surrounded by whitespace. Empty constructor,method, class, enum, interface, loop bodies (blocks), lambdas of the form
<source>public MyClass() {} // empty constructor<br>public void func() {} // empty method<br>public interface Foo {} // empty interface<br>public class Foo {} // empty class<br>public enum Foo {} // empty enum<br>MyClass c = new MyClass() {}; // empty anonymous class<br>while (i = 1) {} // empty while loop<br>for (int i = 1; i > 1; i++) {} // empty for loop<br>do {} while (i = 1); // empty do-while loop<br>Runnable noop = () -> {}; // empty lambda<br>public @interface Beta {} // empty annotation type<br> </source>may optionally be exempted from the policy using the allowEmptyMethods
, allowEmptyConstructors
,allowEmptyTypes
, allowEmptyLoops
,allowEmptyLambdas
and allowEmptyCatches
properties.
This check does not flag as violation double brace initialization like:
new Properties() {{setProperty("key", "value");}};
Parameter allowEmptyCatches allows to suppress violations when tokenlist contains SLIST to check if beginning of block is surrounded bywhitespace and catch block is empty, for example:
try {k = 5 / i;} catch (ArithmeticException ex) {}
With this property turned off, this raises violation because the beginning of thecatch block (left curly bracket) is not separated from the end of the catchblock (right curly bracket).
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Fall through from previous branch of the switch statement. Open
case DATE:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for fall-through in switch
statements. Finds locations where a case
contains Java code but lacks a break
, return
,throw
or continue
statement.
The check honors special comments to suppress the warning.By default the texts"fallthru", "fall thru", "fall-thru","fallthrough", "fall through", "fall-through""fallsthrough", "falls through", "falls-through" (case sensitive).The comment containing these words must be all on one line,and must be on the last non-empty line before thecase
triggering the warning or onthe same line before the case
(ugly, but possible).
Note: The check assumes that there is no unreachablecode in the case
.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'static' modifier out of order with the JLS suggestions. Open
final static class Parent extends BaseOperation {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that the order of modifiers conforms to the suggestions inthe JavaLanguage specification, § 8.1.1, 8.3.1, 8.4.3 and9.4. The correct order is:
public
protected
private
abstract
default
static
final
transient
volatile
synchronized
native
strictfp
In additional, modifiers are checked to ensure all annotations aredeclared before all other modifiers.
Rationale: Code is easier to read if everybody follows a standard.
ATTENTION: We skiptype annotations from validation.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'static' modifier out of order with the JLS suggestions. Open
private final static String GUST_TAG = "gust/" + Core.getGustVersion();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that the order of modifiers conforms to the suggestions inthe JavaLanguage specification, § 8.1.1, 8.3.1, 8.4.3 and9.4. The correct order is:
public
protected
private
abstract
default
static
final
transient
volatile
synchronized
native
strictfp
In additional, modifiers are checked to ensure all annotations aredeclared before all other modifiers.
Rationale: Code is easier to read if everybody follows a standard.
ATTENTION: We skiptype annotations from validation.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Empty line should be followed by <p> tag on the next line.</p> Open
*
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks the Javadoc paragraph.
Checks that:
- There is one blank line between each of two paragraphs.
- Each paragraph but the first has <p> immediately before the first word, withno space after.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'...' is preceded with whitespace. Open
public static boolean matchAnyRole(@Nonnull Descriptor descriptor, @Nonnull DatapointType ...types) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there is no whitespace before a token. Morespecifically, it checks that it is not preceded with whitespace, or(if linebreaks are allowed) all characters on the line before arewhitespace. To allow linebreaks before a token, set propertyallowLineBreaks
to true
. No check occursbefore semi-colons in empty for loop initializers or conditions.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'...' is preceded with whitespace. Open
public static void enforceAnyRole(@Nonnull Message model, @Nonnull DatapointType ...types) throws InvalidModelType {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there is no whitespace before a token. Morespecifically, it checks that it is not preceded with whitespace, or(if linebreaks are allowed) all characters on the line before arewhitespace. To allow linebreaks before a token, set propertyallowLineBreaks
to true
. No check occursbefore semi-colons in empty for loop initializers or conditions.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Empty line should be followed by <p> tag on the next line.</p> Open
*
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks the Javadoc paragraph.
Checks that:
- There is one blank line between each of two paragraphs.
- Each paragraph but the first has <p> immediately before the first word, withno space after.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Line is longer than 120 characters (found 124). Open
ModelMetadata.<String>id(key).orElseThrow(() -> new IllegalArgumentException("Cannot add to cache with empty key.")));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for long lines.
Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'static' modifier out of order with the JLS suggestions. Open
public final static String DEFAULT_FIRESTORE_ENDPOINT = "firestore.googleapis.com";
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that the order of modifiers conforms to the suggestions inthe JavaLanguage specification, § 8.1.1, 8.3.1, 8.4.3 and9.4. The correct order is:
public
protected
private
abstract
default
static
final
transient
volatile
synchronized
native
strictfp
In additional, modifiers are checked to ensure all annotations aredeclared before all other modifiers.
Rationale: Code is easier to read if everybody follows a standard.
ATTENTION: We skiptype annotations from validation.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Missing a Javadoc comment. Open
public Builder treatAsMapWithMultipleFieldsAsKey(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for missing Javadoc comments for a method or constructor.The scope to verify is specified using the Scope
class anddefaults to Scope.PUBLIC
. To verify anotherscope, set property scope to a differentscope.
Javadoc is not required on a method that is tagged with the@Override
annotation. However underJava 5 it is not possible to mark a method required for aninterface (this was corrected under Java 6). HenceCheckstyle supports using the convention of using a single{@inheritDoc}
tag instead of all theother tags.
For getters and setters for the property allowMissingPropertyJavadoc
,the methods must match exactly the structures below.
public void setNumber(final int number){mNumber = number;}public int getNumber(){return mNumber;}public boolean isSomething(){return false;}
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Empty line should be followed by <p> tag on the next line.</p> Open
*
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks the Javadoc paragraph.
Checks that:
- There is one blank line between each of two paragraphs.
- Each paragraph but the first has <p> immediately before the first word, withno space after.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
At-clause should have a non-empty description. Open
* @param <Model>
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that the block tag is followed by description.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Line is longer than 120 characters (found 126). Open
@Override public CompletionStage<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for long lines.
Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.