I have an annotation:
@ComponentScan(
basePackages = {
"com.example.foo",
"com.example.bar"
} // <--- false positive reported in this line
)
public class FooBar extends WebMvcConfigurerAdapter {
...
}
And the Checkstyle configuration:
<module name="AnnotationUseStyle" />
<module name="Indentation">
<property name="basicOffset" value="2" />
<property name="braceAdjustment" value="0" />
<property name="caseIndent" value="2" />
</module>
When I run my project through Checkstyle, I get the error message "Assign child at indentation level 2 not on the correct indentation, 4". This is a link to line 5 of my sample code above, i.e. The closing bracket for the property basePackages.
What configuration change do I need for Checkstyle so that this annotation is validated correctly?
source
share