[Code health] checkstyle reports indentation error when using @Rule annotation
See original GitHub issueConsider the following code:
public @Rule(order = 0)
HiltAndroidRule hiltRule = new HiltAndroidRule(this);
Running checkstyle
on this returns an error:
'HiltAndroidRule' has incorrect indentation level 2, expected level should be 6. [Indentation]
This is not correct, since the indentation of both lines is correct (2 spaces).
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Checkstyle issuing an indentation warning on an annotation?
When I run my project through Checkstyle, I get an error stating "assign child at indentation level 2 not at correct indentation, 4"....
Read more >Checks - checkstyle
Checks location of annotation on language elements. AnnotationOnSameLine, Checks that annotations are located on the same line with their targets.
Read more >Javadoc Comments - checkstyle
As workaround, you need to specify both types in javadoc (parent and exact type). Javadoc is not required on a method that is...
Read more >Google Java Style Guide - Checkstyle
1 Introduction. This document serves as the complete definition of Google's coding standards for source code in the Java™ Programming Language.
Read more >checkstyle – Old Release Notes - SourceForge
Author: Roman Ivanov; Java Grammar: need to introduce "id" rule to solve ... Author: Shashwat Jaiswal #7834; Pitest Issue: Indentation.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wouldn’t we generally put the visibility modifiers (public) after the annotations?
#569 merged so closing. Please reopen if necessary.