Skip to content

Instantly share code, notes, and snippets.

@romani
Created January 5, 2025 02:57
Show Gist options
  • Select an option

  • Save romani/ab7322a11b8281fe96d6530df8a16ef3 to your computer and use it in GitHub Desktop.

Select an option

Save romani/ab7322a11b8281fe96d6530df8a16ef3 to your computer and use it in GitHub Desktop.
OneStatementPerLine is affected by annotation #12769
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml"/>
<module name="TreeWalker">
<module name="OneStatementPerLine"/>
</module>
</module>
public class Main {
String str = "123";
; // report a OneStatementPerLine warning here
@MyAnnotation
String str = "123";
; // no OneStatementPerLine Warning
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment