Loading core/clang/tidy.mk +4 −4 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ # Most Android source files are not clang-tidy clean yet. # Global tidy checks include only google* and misc-macro-parentheses, # but not google-readability*. # but not google-readability* or google-runtime-references. DEFAULT_GLOBAL_TIDY_CHECKS := \ -*,google*,-google-readability*,misc-macro-parentheses -*,google*,-google-readability*,-google-runtime-references,misc-macro-parentheses # Disable style rules usually not followed by external projects. # Every word in DEFAULT_LOCAL_TIDY_CHECKS list has the following format: Loading @@ -37,9 +37,9 @@ DEFAULT_LOCAL_TIDY_CHECKS := \ external/webrtc/:,google-runtime-int \ hardware/qcom:,-google-build-using-namespace \ hardware/qcom:,-google-explicit-constructor,-google-runtime-int \ vendor/lge:,-google-build-using-namespace \ vendor/lge:,-google-build-using-namespace,-misc-macro-parentheses \ vendor/lge:,-google-explicit-constructor,-google-runtime-int \ vendor/widevine:,-google-build-using-namespace \ vendor/widevine:,-google-build-using-namespace,-misc-macro-parentheses \ vendor/widevine:,-google-explicit-constructor,-google-runtime-int \ # Returns 2nd word of $(1) if $(2) has prefix of the 1st word of $(1). Loading tools/warn.py +20 −5 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ warnpatterns = [ 'patterns':[r".*: warning: incompatible implicit declaration of built-in function .+"] }, { 'category':'C/C++', 'severity':severity.HIGH, 'members':[], 'option':'', 'description':'Null passed as non-null argument', 'patterns':[r".*: warning: Null passed to a callee that requires a non-null argument"] }, 'patterns':[r".*: warning: Null passed to a callee that requires a non-null"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wunused-parameter', 'description':'Unused parameter', 'patterns':[r".*: warning: unused parameter '.*'"] }, Loading Loading @@ -1366,6 +1366,9 @@ warnpatterns = [ { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'', 'description':'Possible broken line continuation', 'patterns':[r".*: warning: backslash and newline separated by space"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wundefined-var-template', 'description':'Undefined variable template', 'patterns':[r".*: warning: instantiation of variable .* no definition is available"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wundefined-inline', 'description':'Inline function is not defined', 'patterns':[r".*: warning: inline function '.*' is not defined"] }, Loading Loading @@ -1504,9 +1507,9 @@ warnpatterns = [ { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wnon-literal-null-conversion', 'description':'Zero used as null pointer', 'patterns':[r".*: warning: expression .* zero treated as a null pointer constant"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wliteral-conversion', { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'', 'description':'Implicit conversion changes value', 'patterns':[r".*: warning: implicit conversion .* changes value from .* to .*literal-conversion"] }, 'patterns':[r".*: warning: implicit conversion .* changes value from .* to .*-conversion"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'', 'description':'Passing NULL as non-pointer argument', 'patterns':[r".*: warning: passing NULL to non-pointer argument [0-9]+ of '.+'"] }, Loading Loading @@ -1734,8 +1737,17 @@ warnpatterns = [ 'description':'clang-tidy c++ core guidelines', 'patterns':[r".*: .+\[cppcoreguidelines-.+\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime', 'patterns':[r".*: .+\[google-runtime-.+\]$"] }, 'description':'clang-tidy google-default-arguments', 'patterns':[r".*: .+\[google-default-arguments\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime-int', 'patterns':[r".*: .+\[google-runtime-int\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime-operator', 'patterns':[r".*: .+\[google-runtime-operator\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime-references', 'patterns':[r".*: .+\[google-runtime-references\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-build', 'patterns':[r".*: .+\[google-build-.+\]$"] }, Loading @@ -1748,6 +1760,9 @@ warnpatterns = [ { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-global', 'patterns':[r".*: .+\[google-global-.+\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google- other', 'patterns':[r".*: .+\[google-.+\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy modernize', 'patterns':[r".*: .+\[modernize-.+\]$"] }, Loading Loading
core/clang/tidy.mk +4 −4 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ # Most Android source files are not clang-tidy clean yet. # Global tidy checks include only google* and misc-macro-parentheses, # but not google-readability*. # but not google-readability* or google-runtime-references. DEFAULT_GLOBAL_TIDY_CHECKS := \ -*,google*,-google-readability*,misc-macro-parentheses -*,google*,-google-readability*,-google-runtime-references,misc-macro-parentheses # Disable style rules usually not followed by external projects. # Every word in DEFAULT_LOCAL_TIDY_CHECKS list has the following format: Loading @@ -37,9 +37,9 @@ DEFAULT_LOCAL_TIDY_CHECKS := \ external/webrtc/:,google-runtime-int \ hardware/qcom:,-google-build-using-namespace \ hardware/qcom:,-google-explicit-constructor,-google-runtime-int \ vendor/lge:,-google-build-using-namespace \ vendor/lge:,-google-build-using-namespace,-misc-macro-parentheses \ vendor/lge:,-google-explicit-constructor,-google-runtime-int \ vendor/widevine:,-google-build-using-namespace \ vendor/widevine:,-google-build-using-namespace,-misc-macro-parentheses \ vendor/widevine:,-google-explicit-constructor,-google-runtime-int \ # Returns 2nd word of $(1) if $(2) has prefix of the 1st word of $(1). Loading
tools/warn.py +20 −5 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ warnpatterns = [ 'patterns':[r".*: warning: incompatible implicit declaration of built-in function .+"] }, { 'category':'C/C++', 'severity':severity.HIGH, 'members':[], 'option':'', 'description':'Null passed as non-null argument', 'patterns':[r".*: warning: Null passed to a callee that requires a non-null argument"] }, 'patterns':[r".*: warning: Null passed to a callee that requires a non-null"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wunused-parameter', 'description':'Unused parameter', 'patterns':[r".*: warning: unused parameter '.*'"] }, Loading Loading @@ -1366,6 +1366,9 @@ warnpatterns = [ { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'', 'description':'Possible broken line continuation', 'patterns':[r".*: warning: backslash and newline separated by space"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wundefined-var-template', 'description':'Undefined variable template', 'patterns':[r".*: warning: instantiation of variable .* no definition is available"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wundefined-inline', 'description':'Inline function is not defined', 'patterns':[r".*: warning: inline function '.*' is not defined"] }, Loading Loading @@ -1504,9 +1507,9 @@ warnpatterns = [ { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wnon-literal-null-conversion', 'description':'Zero used as null pointer', 'patterns':[r".*: warning: expression .* zero treated as a null pointer constant"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'-Wliteral-conversion', { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'', 'description':'Implicit conversion changes value', 'patterns':[r".*: warning: implicit conversion .* changes value from .* to .*literal-conversion"] }, 'patterns':[r".*: warning: implicit conversion .* changes value from .* to .*-conversion"] }, { 'category':'C/C++', 'severity':severity.MEDIUM, 'members':[], 'option':'', 'description':'Passing NULL as non-pointer argument', 'patterns':[r".*: warning: passing NULL to non-pointer argument [0-9]+ of '.+'"] }, Loading Loading @@ -1734,8 +1737,17 @@ warnpatterns = [ 'description':'clang-tidy c++ core guidelines', 'patterns':[r".*: .+\[cppcoreguidelines-.+\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime', 'patterns':[r".*: .+\[google-runtime-.+\]$"] }, 'description':'clang-tidy google-default-arguments', 'patterns':[r".*: .+\[google-default-arguments\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime-int', 'patterns':[r".*: .+\[google-runtime-int\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime-operator', 'patterns':[r".*: .+\[google-runtime-operator\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-runtime-references', 'patterns':[r".*: .+\[google-runtime-references\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-build', 'patterns':[r".*: .+\[google-build-.+\]$"] }, Loading @@ -1748,6 +1760,9 @@ warnpatterns = [ { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google-global', 'patterns':[r".*: .+\[google-global-.+\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy google- other', 'patterns':[r".*: .+\[google-.+\]$"] }, { 'category':'C/C++', 'severity':severity.TIDY, 'members':[], 'option':'', 'description':'clang-tidy modernize', 'patterns':[r".*: .+\[modernize-.+\]$"] }, Loading