Tools: Update warn.py for Errorprone 2.3.1
Note: this uses the default severity in Errorprone, modulo forced-ERROR settings in Android. Bug: 72971960 Test: manual Change-Id: I6d8b855b88289b763b2a98e8685627bf1163989d
This commit is contained in:
parent
2e987af407
commit
b9dc23a4d8
514
tools/warn.py
514
tools/warn.py
|
@ -504,13 +504,8 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Field name is CONSTANT CASE, but field is not static and final',
|
||||
'Java: Field name is CONSTANT_CASE, but field is not static and final',
|
||||
'patterns': [r".*: warning: \[ConstantField\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Deprecated item is not annotated with @Deprecated',
|
||||
'patterns': [r".*: warning: \[DepAnn\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
|
@ -519,8 +514,8 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Prefer assertThrows to ExpectedException',
|
||||
'patterns': [r".*: warning: \[ExpectedExceptionMigration\] .+"]},
|
||||
'Java: This field is only assigned during initialization; consider making it final',
|
||||
'patterns': [r".*: warning: \[FieldCanBeFinal\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
|
@ -531,16 +526,6 @@ warn_patterns = [
|
|||
'description':
|
||||
r'Java: Use Java\'s utility functional interfaces instead of Function\u003cA, B> for primitive types.',
|
||||
'patterns': [r".*: warning: \[LambdaFunctionalInterface\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Logger instances are not constants -- they are mutable and have side effects -- and should not be named using CONSTANT CASE',
|
||||
'patterns': [r".*: warning: \[LoggerVariableCase\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Prefer \'L\' to \'l\' for the suffix to long literals',
|
||||
'patterns': [r".*: warning: \[LongLiteralLowerCaseSuffix\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
|
@ -585,17 +570,12 @@ warn_patterns = [
|
|||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Add a private constructor to modules that will not be instantiated by Dagger.',
|
||||
'patterns': [r".*: warning: \[PrivateConstructorForNoninstantiableModuleTest\] .+"]},
|
||||
'patterns': [r".*: warning: \[PrivateConstructorForNoninstantiableModule\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Utility classes (only static members) are not designed to be instantiated and should be made noninstantiable with a default constructor.',
|
||||
'patterns': [r".*: warning: \[PrivateConstructorForUtilityClass\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: ',
|
||||
'patterns': [r".*: warning: \[RemoveFieldPrefixes\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
|
@ -609,13 +589,13 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: The default case of a switch should appear at the end of the last statement group',
|
||||
'patterns': [r".*: warning: \[SwitchDefault\] .+"]},
|
||||
'Java: Scopes on modules have no function and will soon be an error.',
|
||||
'patterns': [r".*: warning: \[ScopeOnModule\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
'Java: Prefer assertThrows to @Test(expected=...)',
|
||||
'patterns': [r".*: warning: \[TestExceptionMigration\] .+"]},
|
||||
'Java: The default case of a switch should appear at the end of the last statement group',
|
||||
'patterns': [r".*: warning: \[SwitchDefault\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.LOW,
|
||||
'description':
|
||||
|
@ -671,6 +651,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Assertions may be disabled at runtime and do not guarantee that execution will halt here; consider throwing an exception instead',
|
||||
'patterns': [r".*: warning: \[AssertFalse\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: The lambda passed to assertThows should contain exactly one statement',
|
||||
'patterns': [r".*: warning: \[AssertThrowsMultipleStatements\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -711,6 +696,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: valueOf or autoboxing provides better time and space performance',
|
||||
'patterns': [r".*: warning: \[BoxedPrimitiveConstructor\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: ByteBuffer.array() shouldn\'t be called unless ByteBuffer.arrayOffset() is used or if the ByteBuffer was initialized using ByteBuffer.wrap() or ByteBuffer.allocate().',
|
||||
'patterns': [r".*: warning: \[ByteBufferBackingArray\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -774,8 +764,13 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Implicit use of the platform default charset, which can result in differing behavior between JVM executions or incorrect behavior if the encoding of the data source doesn\'t match expectations.',
|
||||
'Java: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn\'t match expectations.',
|
||||
'patterns': [r".*: warning: \[DefaultCharset\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Prefer collection factory methods or builders to the double-brace initialization pattern.',
|
||||
'patterns': [r".*: warning: \[DoubleBraceInitialization\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -821,26 +816,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Floating point literal loses precision',
|
||||
'patterns': [r".*: warning: \[FloatingPointLiteralPrecision\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Invalid message format-style format specifier ({0}), expected printf-style (%s)',
|
||||
'patterns': [r".*: warning: \[FloggerMessageFormat\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Logger level check is already implied in the log() call. An explicit at[Level]().isEnabled() check is redundant.',
|
||||
'patterns': [r".*: warning: \[FloggerRedundantIsEnabled\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Calling withCause(Throwable) with an inline allocated Throwable is discouraged. Consider using withStackTrace(StackSize) instead, and specifying a reduced stack size (e.g. SMALL, MEDIUM or LARGE) instead of FULL, to improve performance.',
|
||||
'patterns': [r".*: warning: \[FloggerWithCause\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Use withCause to associate Exceptions with log statements',
|
||||
'patterns': [r".*: warning: \[FloggerWithoutCause\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -876,11 +851,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Hiding fields of superclasses may cause confusion and errors',
|
||||
'patterns': [r".*: warning: \[HidingField\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: No bug exists to track an ignored test',
|
||||
'patterns': [r".*: warning: \[IgnoredTestWithoutBug\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -896,6 +866,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: This annotation has incompatible modifiers as specified by its @IncompatibleModifiers annotation',
|
||||
'patterns': [r".*: warning: \[IncompatibleModifiers\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: It is confusing to have a field and a parameter under the same scope that differ only in capitalization.',
|
||||
'patterns': [r".*: warning: \[InconsistentCapitalization\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -941,16 +916,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Some JUnit4 construct cannot be used in a JUnit3 context. Convert your class to JUnit4 style to use them.',
|
||||
'patterns': [r".*: warning: \[JUnit4ClassUsedInJUnit3\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: @Ignore is preferred to @Suppress for JUnit4 tests. @Suppress may silently fail in JUnit4 (that is, tests may run anyway.)',
|
||||
'patterns': [r".*: warning: \[JUnit4SuppressWithoutIgnore\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Medium and large test classes should document why they are medium or large',
|
||||
'patterns': [r".*: warning: \[JUnit4TestAttributeMissing\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -961,26 +926,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Never reuse class names from java.lang',
|
||||
'patterns': [r".*: warning: \[JavaLangClash\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: java.net.IDN implements the older IDNA2003 standard. Prefer com.google.i18n.Idn, which implements the newer UTS #46 standard',
|
||||
'patterns': [r".*: warning: \[JavaNetIdn\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Suggests alternatives to obsolete JDK classes.',
|
||||
'patterns': [r".*: warning: \[JdkObsolete\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Consider requiring strict parsing on JodaDurationFlag instances. Before adjusting existing flags, check the documentation and your existing configuration to avoid crashes!',
|
||||
'patterns': [r".*: warning: \[JodaDurationFlagStrictParsing\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Logging an exception and throwing it (or a new exception) for the same exceptional situation is an anti-pattern.',
|
||||
'patterns': [r".*: warning: \[LogAndThrow\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1006,11 +956,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: method overrides method in supertype; expected @Override',
|
||||
'patterns': [r".*: warning: \[MissingOverride\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: FormattingLogger uses wrong or mismatched format string',
|
||||
'patterns': [r".*: warning: \[MisusedFormattingLogger\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1051,16 +996,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Static import of member uses non-canonical name',
|
||||
'patterns': [r".*: warning: \[NonCanonicalStaticMemberImport\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Flags should be final',
|
||||
'patterns': [r".*: warning: \[NonFinalFlag\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Public fields must be final.',
|
||||
'patterns': [r".*: warning: \[NonFinalPublicFields\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1081,6 +1016,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: void-returning methods should not be annotated with @Nullable, since they cannot return null',
|
||||
'patterns': [r".*: warning: \[NullableVoid\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Calling toString on Objects that don\'t override toString() doesn\'t provide useful information',
|
||||
'patterns': [r".*: warning: \[ObjectToString\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1116,11 +1056,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Detects `/* name= */`-style comments on actual parameters where the name doesn\'t match the formal parameter',
|
||||
'patterns': [r".*: warning: \[ParameterName\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Pluggable Type checker internal error',
|
||||
'patterns': [r".*: warning: \[PluggableTypeChecker\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1131,11 +1066,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Passing a primitive array to a varargs method is usually wrong',
|
||||
'patterns': [r".*: warning: \[PrimitiveArrayPassedToVarargsMethod\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Private fields that are only assigned in the initializer should be made final.',
|
||||
'patterns': [r".*: warning: \[PrivateFieldsNotAssigned\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1149,7 +1079,12 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Injection frameworks currently don\'t understand Qualifiers in TYPE PARAMETER or TYPE USE contexts.',
|
||||
'Java: Qualifiers/Scope annotations on @Inject methods don\'t have any effect. Move the qualifier annotation to the binding location.',
|
||||
'patterns': [r".*: warning: \[QualifierOrScopeOnInjectMethod\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Injection frameworks currently don\'t understand Qualifiers in TYPE_PARAMETER or TYPE_USE contexts.',
|
||||
'patterns': [r".*: warning: \[QualifierWithTypeUse\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
|
@ -1171,31 +1106,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: This annotation is missing required modifiers as specified by its @RequiredModifiers annotation',
|
||||
'patterns': [r".*: warning: \[RequiredModifiers\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Lists returned by methods should be immutable.',
|
||||
'patterns': [r".*: warning: \[ReturnedListNotImmutable\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Parameters to log methods should not be generated by a call to String.format() or MessageFormat.format().',
|
||||
'patterns': [r".*: warning: \[SaferLoggerFormat\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Parameters to log methods should not be generated by a call to toString(); see b/22986665.',
|
||||
'patterns': [r".*: warning: \[SaferLoggerToString\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
r'Java: Prefer the short-circuiting boolean operators \u0026\u0026 and || to \u0026 and |.',
|
||||
'patterns': [r".*: warning: \[ShortCircuitBoolean\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Reading a flag from a static field or initializer block will cause it to always receive the default value and will cause an IllegalFlagStateException if the flag is ever set.',
|
||||
'patterns': [r".*: warning: \[StaticFlagUsage\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1219,12 +1134,7 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: String.split should never take only a single argument; it has surprising behavior',
|
||||
'patterns': [r".*: warning: \[StringSplit\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Prefer Splitter to String.split',
|
||||
'Java: String.split(String) has surprising behavior',
|
||||
'patterns': [r".*: warning: \[StringSplitter\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
|
@ -1256,6 +1166,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Truth Library assert is called on a constant.',
|
||||
'patterns': [r".*: warning: \[TruthConstantAsserts\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Argument is not compatible with the subject\'s type.',
|
||||
'patterns': [r".*: warning: \[TruthIncompatibleType\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1269,7 +1184,7 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Creation of a Set/HashSet/HashMap of java.net.URL. equals() and hashCode() of java.net.URL class make blocking internet connections.',
|
||||
'Java: Avoid hash-based containers of java.net.URL--the containers rely on equals() and hashCode(), which cause java.net.URL to make blocking internet connections.',
|
||||
'patterns': [r".*: warning: \[URLEqualsHashCode\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
|
@ -1281,11 +1196,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Finalizer may run before native code finishes execution',
|
||||
'patterns': [r".*: warning: \[UnsafeFinalization\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
'Java: Apps must use BuildCompat.isAtLeastO to check whether they\'re running on Android O',
|
||||
'patterns': [r".*: warning: \[UnsafeSdkVersionCheck\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.MEDIUM,
|
||||
'description':
|
||||
|
@ -1314,18 +1224,8 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Adds checkOrThrow calls where needed',
|
||||
'patterns': [r".*: warning: \[AddCheckOrThrow\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of class, field, or method that is not compatible with legacy Android devices',
|
||||
'patterns': [r".*: warning: \[AndroidApiChecker\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Invalid use of Flogger format string',
|
||||
'patterns': [r".*: warning: \[AndroidFloggerFormatString\] .+"]},
|
||||
'Java: AndroidInjection.inject() should always be invoked before calling super.lifecycleMethod()',
|
||||
'patterns': [r".*: warning: \[AndroidInjectionBeforeSuper\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1351,6 +1251,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Arrays.asList does not autobox primitive arrays, as one might expect.',
|
||||
'patterns': [r".*: warning: \[ArraysAsListPrimitiveArray\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: @AssistedInject and @Inject cannot be used on the same constructor.',
|
||||
'patterns': [r".*: warning: \[AssistedInjectAndInjectOnSameConstructor\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1364,13 +1269,18 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Shift by an amount that is out of range',
|
||||
'patterns': [r".*: warning: \[BadShiftAmount\] .+"]},
|
||||
'Java: @AutoFactory and @Inject should not be used in the same type.',
|
||||
'patterns': [r".*: warning: \[AutoFactoryAtInject\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: New splicers are disallowed on paths that are being Libsearched',
|
||||
'patterns': [r".*: warning: \[BlacklistedSplicerPathChecker\] .+"]},
|
||||
'Java: Arguments to AutoValue constructor are in the wrong order',
|
||||
'patterns': [r".*: warning: \[AutoValueConstructorOrderChecker\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Shift by an amount that is out of range',
|
||||
'patterns': [r".*: warning: \[BadShiftAmount\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1436,6 +1346,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Compile-time constant expression overflows',
|
||||
'patterns': [r".*: warning: \[ConstantOverflow\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Dagger @Provides methods may not return null unless annotated with @Nullable',
|
||||
'patterns': [r".*: warning: \[DaggerProvidesNull\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1446,6 +1361,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Thread created but not started',
|
||||
'patterns': [r".*: warning: \[DeadThread\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Deprecated item is not annotated with @Deprecated',
|
||||
'patterns': [r".*: warning: \[DepAnn\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1456,36 +1376,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: This method should not be called.',
|
||||
'patterns': [r".*: warning: \[DoNotCall\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use TunnelException.getCauseAs(Class) instead of casting the result of TunnelException.getCause().',
|
||||
'patterns': [r".*: warning: \[DoNotCastTunnelExceptionCause\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
r'Java: Implementing \'Comparable\u003cT>\' where T is not compatible with the implementing class.',
|
||||
'patterns': [r".*: warning: \[ComparableType\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Duration Flag should NOT have units in the variable name or the @FlagSpec\'s name or altName field.',
|
||||
'patterns': [r".*: warning: \[DurationFlagWithUnits\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Duration.get() only works with SECONDS or NANOS.',
|
||||
'patterns': [r".*: warning: \[DurationGetTemporalUnit\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Empty statement after if',
|
||||
'patterns': [r".*: warning: \[EmptyIf\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Explicitly enumerate all cases in switch statements for certain enum types.',
|
||||
'patterns': [r".*: warning: \[EnumerateAllCasesInEnumSwitch\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1496,31 +1391,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: == must be used in equals method to check equality to itself or an infinite loop will occur.',
|
||||
'patterns': [r".*: warning: \[EqualsReference\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Detects errors encountered building Error Prone plugins',
|
||||
'patterns': [r".*: warning: \[ErrorPronePluginCorrectness\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Invalid printf-style format string',
|
||||
'patterns': [r".*: warning: \[FloggerFormatString\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Method annotated @ForOverride must be protected or package-private and only invoked from declaring class, or from an override of the method',
|
||||
'patterns': [r".*: warning: \[ForOverride\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Equality on Nano protos (== or .equals) might not be the same in Lite',
|
||||
'patterns': [r".*: warning: \[ForbidNanoEquality\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Submessages of a proto cannot be mutated',
|
||||
'patterns': [r".*: warning: \[ForbidSubmessageMutation\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1536,11 +1411,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Casting a lambda to this @FunctionalInterface can cause a behavior change from casting to a functional superinterface, which is surprising to users. Prefer decorator methods to this surprising behavior.',
|
||||
'patterns': [r".*: warning: \[FunctionalInterfaceMethodChanged\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Future.get in Google Now Producers code',
|
||||
'patterns': [r".*: warning: \[FutureGetInNowProducers\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1566,6 +1436,21 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Checks for unguarded accesses to fields and methods with @GuardedBy annotations',
|
||||
'patterns': [r".*: warning: \[GuardedBy\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Scope annotation on implementation class of AssistedInject factory is not allowed',
|
||||
'patterns': [r".*: warning: \[GuiceAssistedInjectScoping\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: A constructor cannot have two @Assisted parameters of the same type unless they are disambiguated with named @Assisted annotations.',
|
||||
'patterns': [r".*: warning: \[GuiceAssistedParameters\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Although Guice allows injecting final fields, doing so is disallowed because the injected value may not be visible to other threads.',
|
||||
'patterns': [r".*: warning: \[GuiceInjectOnFinalField\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1606,6 +1491,36 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: This method always recurses, and will cause a StackOverflowError',
|
||||
'patterns': [r".*: warning: \[InfiniteRecursion\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: A scoping annotation\'s Target should include TYPE and METHOD.',
|
||||
'patterns': [r".*: warning: \[InjectInvalidTargetingOnScopingAnnotation\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Using more than one qualifier annotation on the same element is not allowed.',
|
||||
'patterns': [r".*: warning: \[InjectMoreThanOneQualifier\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: A class can be annotated with at most one scope annotation.',
|
||||
'patterns': [r".*: warning: \[InjectMoreThanOneScopeAnnotationOnClass\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Scope annotation on an interface or abstact class is not allowed',
|
||||
'patterns': [r".*: warning: \[InjectScopeAnnotationOnInterfaceOrAbstractClass\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Scoping and qualifier annotations must have runtime retention.',
|
||||
'patterns': [r".*: warning: \[InjectScopeOrQualifierAnnotationRetention\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Injected constructors cannot be optional nor have binding annotations',
|
||||
'patterns': [r".*: warning: \[InjectedConstructorAnnotations\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1651,11 +1566,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: This method should be static',
|
||||
'patterns': [r".*: warning: \[JUnit4ClassAnnotationNonStatic\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Test class may not be run because it is missing a @RunWith annotation',
|
||||
'patterns': [r".*: warning: \[JUnit4RunWithMissing\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1669,7 +1579,7 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: This looks like a test method but is not run; please add @Test or @Ignore, or, if this is a helper method, reduce its visibility.',
|
||||
'Java: This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.',
|
||||
'patterns': [r".*: warning: \[JUnit4TestNotRun\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
|
@ -1679,78 +1589,18 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Do not call assumeTrue(tester.getExperimentValueFor(...)). Use @RequireEndToEndTestExperiment instead.',
|
||||
'patterns': [r".*: warning: \[JUnitAssumeExperiment\] .+"]},
|
||||
'Java: Abstract and default methods are not injectable with javax.inject.Inject',
|
||||
'patterns': [r".*: warning: \[JavaxInjectOnAbstractMethod\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of class, field, or method that is not compatible with JDK 7',
|
||||
'patterns': [r".*: warning: \[Java7ApiChecker\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of java.time.Duration.withNanos(int) is not allowed.',
|
||||
'patterns': [r".*: warning: \[JavaDurationWithNanos\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of java.time.Duration.withSeconds(long) is not allowed.',
|
||||
'patterns': [r".*: warning: \[JavaDurationWithSeconds\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: java.time APIs that silently use the default system time-zone are not allowed.',
|
||||
'patterns': [r".*: warning: \[JavaTimeDefaultTimeZone\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of new Duration(long) is not allowed. Please use Duration.millis(long) instead.',
|
||||
'patterns': [r".*: warning: \[JodaDurationConstructor\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of duration.withMillis(long) is not allowed. Please use Duration.millis(long) instead.',
|
||||
'patterns': [r".*: warning: \[JodaDurationWithMillis\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of instant.withMillis(long) is not allowed. Please use new Instant(long) instead.',
|
||||
'patterns': [r".*: warning: \[JodaInstantWithMillis\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
r'Java: Use of JodaTime\'s type.plus(long) or type.minus(long) is not allowed (where \u003ctype> = {Duration,Instant,DateTime,DateMidnight}). Please use type.plus(Duration.millis(long)) or type.minus(Duration.millis(long)) instead.',
|
||||
'patterns': [r".*: warning: \[JodaPlusMinusLong\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Changing JodaTime\'s current time is not allowed in non-testonly code.',
|
||||
'patterns': [r".*: warning: \[JodaSetCurrentMillis\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Use of Joda-Time\'s DateTime.toDateTime(), Duration.toDuration(), Instant.toInstant(), Interval.toInterval(), and Period.toPeriod() are not allowed.',
|
||||
'patterns': [r".*: warning: \[JodaToSelf\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
r'Java: Use of JodaTime\'s type.withDurationAdded(long, int) (where \u003ctype> = {Duration,Instant,DateTime}). Please use type.withDurationAdded(Duration.millis(long), int) instead.',
|
||||
'patterns': [r".*: warning: \[JodaWithDurationAddedLong\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: LanguageCode comparison using reference equality instead of value equality',
|
||||
'patterns': [r".*: warning: \[LanguageCodeEquality\] .+"]},
|
||||
'Java: @javax.inject.Inject cannot be put on a final field.',
|
||||
'patterns': [r".*: warning: \[JavaxInjectOnFinalField\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: This pattern will silently corrupt certain byte sequences from the serialized protocol message. Use ByteString or byte[] directly',
|
||||
'patterns': [r".*: warning: \[LiteByteStringUtf8\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: The zero argument toString is not part of the Localizable interface and likely is just the java Object toString. You probably want to call toString(Locale).',
|
||||
'patterns': [r".*: warning: \[LocalizableWrongToString\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1759,8 +1609,8 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Logging tag cannot be longer than 23 characters.',
|
||||
'patterns': [r".*: warning: \[LogTagLength\] .+"]},
|
||||
'Java: Prefer \'L\' to \'l\' for the suffix to long literals',
|
||||
'patterns': [r".*: warning: \[LongLiteralLowerCaseSuffix\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1796,6 +1646,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Using a collection function with itself as the argument.',
|
||||
'patterns': [r".*: warning: \[ModifyingCollectionWithItself\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: This class has more than one @Inject-annotated constructor. Please remove the @Inject annotation from all but one of them.',
|
||||
'patterns': [r".*: warning: \[MoreThanOneInjectableConstructor\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1806,21 +1661,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: The first argument to nCopies is the number of copies, and the second is the item to copy',
|
||||
'patterns': [r".*: warning: \[NCopiesOfChar\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Repeated fields on proto messages cannot be directly referenced',
|
||||
'patterns': [r".*: warning: \[NanoUnsafeRepeatedFieldUsage\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: @NoAllocation was specified on this method, but something was found that would trigger an allocation',
|
||||
'patterns': [r".*: warning: \[NoAllocation\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: DynamicActivity.findViewById(int) is slow and should not be used inside View.onDraw(Canvas)!',
|
||||
'patterns': [r".*: warning: \[NoFindViewByIdInOnDrawChecker\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1849,13 +1694,18 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Any class that extends IntentService should have @Nullable notation on method onHandleIntent(@Nullable Intent intent) and handle the case if intent is null.',
|
||||
'patterns': [r".*: warning: \[OnHandleIntentNullableChecker\] .+"]},
|
||||
'Java: Comparison using reference equality instead of value equality',
|
||||
'patterns': [r".*: warning: \[OptionalEquality\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Comparison using reference equality instead of value equality',
|
||||
'patterns': [r".*: warning: \[OptionalEquality\] .+"]},
|
||||
'Java: Annotations cannot be both Scope annotations and Qualifier annotations: this causes confusion when trying to use them.',
|
||||
'patterns': [r".*: warning: \[OverlappingQualifierAndScopeAnnotation\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: This method is not annotated with @Inject, but it overrides a method that is annotated with @javax.inject.Inject. The method will not be Injected.',
|
||||
'patterns': [r".*: warning: \[OverridesJavaxInjectableMethod\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1869,13 +1719,8 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
r'Java: Parcelable CREATOR fields should be Creator\u003cT>',
|
||||
'patterns': [r".*: warning: \[ParcelableCreatorType\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Period.get() only works with YEARS, MONTHS, or DAYS.',
|
||||
'patterns': [r".*: warning: \[PeriodGetTemporalUnit\] .+"]},
|
||||
'Java: Detects classes which implement Parcelable but don\'t have CREATOR',
|
||||
'patterns': [r".*: warning: \[ParcelableCreator\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1896,16 +1741,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Access to a private protocol buffer field is forbidden. This protocol buffer carries a security contract, and can only be created using an approved library. Direct access to the fields is forbidden.',
|
||||
'patterns': [r".*: warning: \[PrivateSecurityContractProtoAccess\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Return value of methods returning Promise must be checked. Ignoring returned Promises suppresses exceptions thrown from the code that completes the Promises.',
|
||||
'patterns': [r".*: warning: \[PromiseReturnValueIgnored\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: When returning a Promise, use thenChain() instead of then()',
|
||||
'patterns': [r".*: warning: \[PromiseThenReturningPromise\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1921,6 +1756,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: To get the tag number of a protocol buffer enum, use getNumber() instead.',
|
||||
'patterns': [r".*: warning: \[ProtocolBufferOrdinal\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: @Provides methods need to be declared in a Module to have any effect.',
|
||||
'patterns': [r".*: warning: \[ProvidesMethodOutsideOfModule\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1939,23 +1779,8 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Enforce reflected Parcelables are kept by Proguard',
|
||||
'patterns': [r".*: warning: \[ReflectedParcelable\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Relative class name passed to ComponentName constructor',
|
||||
'patterns': [r".*: warning: \[RelativeComponentName\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Requires that non-@enum int assignments to @enum ints is wrapped in a checkOrThrow',
|
||||
'patterns': [r".*: warning: \[RequireCheckOrThrow\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Assignments into repeated field elements must be sequential',
|
||||
'patterns': [r".*: warning: \[RequireSequentialRepeatedFields\] .+"]},
|
||||
'Java: Use of method or class annotated with @RestrictTo',
|
||||
'patterns': [r".*: warning: \[RestrictTo\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1986,11 +1811,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: This method must be called with an even number of arguments.',
|
||||
'patterns': [r".*: warning: \[ShouldHaveEvenArgs\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: @SimpleEnum applied to non-enum type',
|
||||
'patterns': [r".*: warning: \[SimpleEnumUsage\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -1999,13 +1819,13 @@ warn_patterns = [
|
|||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Calling toString on a Stream does not provide useful information',
|
||||
'patterns': [r".*: warning: \[StreamToString\] .+"]},
|
||||
'Java: Static and default interface methods are not natively supported on older Android devices. ',
|
||||
'patterns': [r".*: warning: \[StaticOrDefaultInterfaceMethod\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Streams.iterating() is unsafe for use except in the header of a for-each loop; please see its Javadoc for details.',
|
||||
'patterns': [r".*: warning: \[StreamsIteratingNotInLoop\] .+"]},
|
||||
'Java: Calling toString on a Stream does not provide useful information',
|
||||
'patterns': [r".*: warning: \[StreamToString\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -2016,16 +1836,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Suppressing "deprecated" is probably a typo for "deprecation"',
|
||||
'patterns': [r".*: warning: \[SuppressWarningsDeprecated\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: TemporalAccessor.get() only works for certain values of ChronoField.',
|
||||
'patterns': [r".*: warning: \[TemporalAccessorGetChronoField\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Type declaration annotated with @ThreadSafe is not thread safe',
|
||||
'patterns': [r".*: warning: \[ThreadSafe\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -2046,21 +1856,11 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: Catching Throwable/Error masks failures from fail() or assert*() in the try block',
|
||||
'patterns': [r".*: warning: \[TryFailThrowable\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Try-with-resources is not supported in this code, use try/finally instead',
|
||||
'patterns': [r".*: warning: \[TryWithResources\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Type parameter used as type qualifier',
|
||||
'patterns': [r".*: warning: \[TypeParameterQualifier\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: In many cases, randomUUID is not necessary, and it slows the performance, which can be quite severe especially when this operation happens at start up time. Consider replacing it with cheaper alternatives, like object.hashCode() or IdGenerator.INSTANCE.getRandomId()',
|
||||
'patterns': [r".*: warning: \[UUIDChecker\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
|
@ -2086,16 +1886,6 @@ warn_patterns = [
|
|||
'description':
|
||||
'Java: `var` should not be used as a type name.',
|
||||
'patterns': [r".*: warning: \[VarTypeName\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: The accessed field or method is not visible here. Note that the default production visibility for @VisibleForTesting is Visibility.PRIVATE.',
|
||||
'patterns': [r".*: warning: \[VisibleForTestingChecker\] .+"]},
|
||||
{'category': 'java',
|
||||
'severity': Severity.HIGH,
|
||||
'description':
|
||||
'Java: Passing Throwable/Exception argument to the message format L.x(). Calling L.w(tag, message, ex) instead of L.w(tag, ex, message)',
|
||||
'patterns': [r".*: warning: \[WrongThrowableArgumentInLogChecker\] .+"]},
|
||||
|
||||
# End warnings generated by Error Prone
|
||||
|
||||
|
|
Loading…
Reference in New Issue