Merge "Add new Java/C++/Yacc warning patterns"

This commit is contained in:
Chih-hung Hsieh 2020-09-22 07:11:54 +00:00 committed by Gerrit Code Review
commit d890f596ce
3 changed files with 14 additions and 2 deletions

View File

@ -155,6 +155,7 @@ warn_patterns = [
[r".*: warning: unknown attribute '.+'"]),
medium('Attribute ignored',
[r".*: warning: '_*packed_*' attribute ignored",
r".*: warning: .* not supported .*Wignored-attributes",
r".*: warning: attribute declaration must precede definition .+ignored-attributes"]),
medium('Visibility problem',
[r".*: warning: declaration of '.+' will not be visible outside of this function"]),
@ -251,6 +252,8 @@ warn_patterns = [
[r".*: warning: taking address of temporary"]),
medium('Taking address of packed member',
[r".*: warning: taking address of packed member"]),
medium('Pack alignment value is modified',
[r".*: warning: .*#pragma pack alignment value is modified.*Wpragma-pack.*"]),
medium('Possible broken line continuation',
[r".*: warning: backslash and newline separated by space"]),
medium('Undefined variable template',
@ -332,7 +335,7 @@ warn_patterns = [
[r".*: warning: extra tokens at end of #endif directive"]),
medium('Comparison between different enums',
[r".*: warning: comparison between '.+' and '.+'.+Wenum-compare",
r".*: warning: comparison of .* enumeration types .*-Wenum-compare-switch"]),
r".*: warning: comparison of .* enumeration types .*-Wenum-compare.*"]),
medium('Conversion may change value',
[r".*: warning: converting negative value '.+' to '.+'",
r".*: warning: conversion to '.+' .+ may (alter|change)"]),
@ -396,6 +399,8 @@ warn_patterns = [
r".*: warning: absolute value function '.+' given .+ which may cause truncation .+Wabsolute-value"]),
low('Using C++11 extensions',
[r".*: warning: 'auto' type specifier is a C\+\+11 extension"]),
low('Using C++17 extensions',
[r".*: warning: .* a C\+\+17 extension .+Wc\+\+17-extensions"]),
low('Refers to implicitly defined namespace',
[r".*: warning: using directive refers to implicitly-defined namespace .+"]),
low('Invalid pp token',
@ -437,8 +442,10 @@ warn_patterns = [
[r".*: warning: unannotated fall-through between switch labels.+Wimplicit-fallthrough"]),
medium('Invalid partial specialization',
[r".*: warning: class template partial specialization.+Winvalid-partial-specialization"]),
medium('Overlapping compatisons',
medium('Overlapping comparisons',
[r".*: warning: overlapping comparisons.+Wtautological-overlap-compare"]),
medium('bitwise comparison',
[r".*: warning: bitwise comparison.+Wtautological-bitwise-compare"]),
medium('int in bool context',
[r".*: warning: converting.+to a boolean.+Wint-in-bool-context"]),
medium('bitwise conditional parentheses',

View File

@ -486,6 +486,7 @@ warn_patterns = [
[r'.*\.java:.*: warning: \[static\] static method should be qualified']),
medium('AbstractInner'),
medium('BothPackageInfoAndHtml'),
medium('BuilderSetStyle'),
medium('CallbackName'),
medium('ExecutorRegistration'),
medium('HiddenTypeParameter'),
@ -493,9 +494,11 @@ warn_patterns = [
medium('ListenerLast'),
medium('MinMaxConstant'),
medium('MissingBuildMethod'),
medium('MissingGetterMatchingBuilder'),
medium('NoByteOrShort'),
medium('OverlappingConstants'),
medium('SetterReturnsThis'),
medium('StaticFinalBuilder'),
medium('StreamFiles'),
medium('Typo'),
medium('UseIcu'),

View File

@ -143,6 +143,8 @@ warn_patterns = [
# Yacc warnings
yacc('deprecate directive',
[r".*\.yy?:.*: warning: deprecated directive: "]),
yacc('reduce/reduce conflicts',
[r".*\.yy?: warning: .+ reduce/reduce conflicts "]),
yacc('shift/reduce conflicts',
[r".*\.yy?: warning: .+ shift/reduce conflicts "]),
{'category': 'yacc', 'severity': Severity.SKIP,