@@ -22,59 +22,66 @@ tasks {
22
22
disableWarningsInGeneratedCode.set(true )
23
23
allDisabledChecksAsWarnings.set(true )
24
24
25
+ // Ignore warnings for generated classes
25
26
excludedPaths.set(" .*/build/generated/.*" )
26
27
27
- if (System .getenv(" CI" ) == null ) {
28
- disable(" SystemOut" )
29
- }
30
-
31
- // Still Java 8
32
- disable(" Varifier" )
28
+ // it's very convenient to debug stuff in the javaagent using System.out.println
29
+ // and we don't want to conditionally only check this in CI
30
+ // because then the remote gradle cache won't work for local builds
31
+ // so we check this via checkstyle instead
32
+ disable(" SystemOut" )
33
33
34
- // Intellij does a nice job of displaying parameter names
35
34
disable(" BooleanParameter" )
36
35
37
- // Needed for legacy 2.x bridge
38
- disable(" JavaUtilDate" )
39
-
40
36
// Doesn't work well with Java 8
41
37
disable(" FutureReturnValueIgnored" )
42
38
43
39
// Needs Java 9+
44
40
disable(" JavaDurationGetSecondsToToSeconds" )
45
41
46
- // Require Guava
42
+ // Still Java 8
43
+ disable(" Varifier" )
44
+
45
+ // Doesn't currently use Var annotations.
46
+ disable(" Var" ) // "-Xep:Var:OFF"
47
+
48
+ // ImmutableRefactoring suggests using com.google.errorprone.annotations.Immutable,
49
+ // but currently uses javax.annotation.concurrent.Immutable
50
+ disable(" ImmutableRefactoring" )
51
+
52
+ // AutoValueImmutableFields suggests returning Guava types from API methods
47
53
disable(" AutoValueImmutableFields" )
48
- disable( " StringSplitter " )
54
+ // Suggests using Guava types for fields but we don't use Guava
49
55
disable(" ImmutableMemberCollection" )
50
56
51
- // Don't currently use this (to indicate a local variable that's mutated) but could
52
- // consider for future.
53
- disable(" Var" )
54
-
55
- // Don't support Android without desugar
57
+ // TODO (trask) use animal sniffer
56
58
disable(" AndroidJdkLibsChecker" )
59
+
60
+ // apparently disabling android doesn't disable this
57
61
disable(" StaticOrDefaultInterfaceMethod" )
58
62
59
- // needed temporarily while hosting azure-monitor-opentelemetry-exporter in this repo
60
- disable(" MissingSummary" )
61
- disable(" UnnecessaryDefaultInEnumSwitch" )
63
+ // TODO (trask) Fix the underlying smoke test methods
62
64
disable(" InconsistentOverloads" )
63
65
64
- disable(" CanIgnoreReturnValueSuggester" )
66
+ // We don't depend on Guava so use normal splitting
67
+ disable(" StringSplitter" )
65
68
66
- disable(" NonFinalStaticField" )
69
+ // allow UPPERCASE type parameter names
70
+ disable(" TypeParameterNaming" )
71
+
72
+ // We end up using obsolete types if a library we're instrumenting uses them.
73
+ disable(" JavaUtilDate" )
74
+
75
+ disable(" CanIgnoreReturnValueSuggester" )
67
76
68
77
// YodaConditions may improve safety in some cases. The argument of increased
69
78
// cognitive load is dubious.
70
79
disable(" YodaCondition" )
71
80
81
+ disable(" NonFinalStaticField" )
82
+
72
83
// Requires adding compile dependency to JSpecify
73
84
disable(" AddNullMarkedToPackageInfo" )
74
-
75
- if (name.contains(" Jmh" )) {
76
- disable(" MemberName" )
77
- }
78
85
}
79
86
}
80
87
}
0 commit comments