Please answer these questions before submitting your issue. Thanks!
What version of Error Prone are you using?
2.2.0 (with maven.plugin 2.8.2)
Does this issue reproduce with the latest release?
Yes
What did you do?
JUnit 5 provides nested tests using an inner class (not static): See Example at https://junit.org/junit5/docs/current/user-guide/#writing-tests-nested
If I use the rule ClassCanBeStatic on all my classes, then all those tests are flagged.
What did you expect to see?
An inner class with the annotation @org.junit.jupiter.api.Nested should not be flagged as warning.
What did you see instead?
[WARNING] /Users/hafner/Development/jenkins/workspace/Pipeline/src/test/java/edu/hm/hafner/analysis/parser/dry/CodeDuplicationTest.java:[64,5] [ClassCanBeStatic] Inner class is non-static but does not reference enclosing class
Please answer these questions before submitting your issue. Thanks!
What version of Error Prone are you using?
2.2.0 (with maven.plugin 2.8.2)
Does this issue reproduce with the latest release?
Yes
What did you do?
JUnit 5 provides nested tests using an inner class (not static): See Example at https://junit.org/junit5/docs/current/user-guide/#writing-tests-nested
If I use the rule ClassCanBeStatic on all my classes, then all those tests are flagged.
What did you expect to see?
An inner class with the annotation
@org.junit.jupiter.api.Nestedshould not be flagged as warning.What did you see instead?
[WARNING] /Users/hafner/Development/jenkins/workspace/Pipeline/src/test/java/edu/hm/hafner/analysis/parser/dry/CodeDuplicationTest.java:[64,5] [ClassCanBeStatic] Inner class is non-static but does not reference enclosing class