rspec/rules/S2156/java/rule.adoc

22 lines
490 B
Plaintext
Raw Normal View History

2020-06-30 12:48:07 +02:00
include::../description.adoc[]
include::../noncompliant.adoc[]
include::../compliant.adoc[]
== Exceptions
2020-12-23 14:59:06 +01:00
Members annotated with Guava's ``@VisibleForTesting`` annotation are ignored, as it indicates that visibility has been purposely relaxed to make the code testable.
2020-06-30 12:48:07 +02:00
----
public final class MyFinalClass {
@VisibleForTesting
protected Logger logger; // Compliant
@VisibleForTesting
protected int calculateSomethingComplex(String input) { // Compliant
// ...
}
}
----