File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,18 +55,19 @@ Only flag substantive problems, not stylistic preference.
5555
5656Read and apply ` docs/contributing/style-guide.md ` .
5757
58- Exceptions :
58+ Do not flag the following patterns (common false positives) :
5959
6060- FQCN is acceptable when class-name collision makes import impossible.
61- - ` @SuppressWarnings ` at method level is preferred over class level for tighter scope, but
61+
62+ ## [ Style] ` @SuppressWarnings ` Usage
63+
64+ - Method-level ` @SuppressWarnings ` is preferred over class-level for tighter scope, but
6265 if more than one method in the class needs the same suppression, class-level is fine.
6366 Do not flag class-level ` @SuppressWarnings ` when multiple methods use the suppressed API.
6467- ** Do not add ` @SuppressWarnings("deprecation") ` unless the build fails without it.**
6568 The project disables javac's ` -Xlint:deprecation ` globally and uses a custom Error Prone
6669 check (` OtelDeprecatedApiUsage ` ) instead. Only add the annotation when it is actually
6770 required to fix an Error Prone error — not speculatively.
68- - Per Google Java Style, ` UPPER_CASE ` naming is only for true constants (deeply immutable
69- values). ` static final ` fields holding mutable objects should be ` camelCase ` .
7071
7172## [ Naming] Getter Naming
7273
You can’t perform that action at this time.
0 commit comments