summaryrefslogtreecommitdiff
path: root/tools/warn/other_warn_patterns.py
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2020-01-13 14:05:17 -0800
committer Chih-Hung Hsieh <chh@google.com> 2020-01-14 11:57:12 -0800
commit5392cdbeb1d3339f8f348cdcfef2df6fd6a0a3c6 (patch)
tree4b87cf302a1db8eda37b2af45778aab055ea04a1 /tools/warn/other_warn_patterns.py
parent997661002af1282d938e88c3c723037e42e5d283 (diff)
Call a writer to dump html; new warning patterns.
* HTML emit functions now take a writer parameter. This makes warn_common.py one step closer to the ChromeOS version. * Add new found warning patterns from java and yacc. Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html Test: warn.py --gencsv build.log > warnings.csv Change-Id: I5c446ca767746598f07603591fdf98f7d82cae17
Diffstat (limited to 'tools/warn/other_warn_patterns.py')
-rw-r--r--tools/warn/other_warn_patterns.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/warn/other_warn_patterns.py b/tools/warn/other_warn_patterns.py
index 1331bc603b..19a4e38625 100644
--- a/tools/warn/other_warn_patterns.py
+++ b/tools/warn/other_warn_patterns.py
@@ -46,6 +46,10 @@ def kotlin(description, pattern_list):
return warn('Kotlin', Severity.MEDIUM, description, pattern_list)
+def yacc(description, pattern_list):
+ return warn('yacc', Severity.MEDIUM, description, pattern_list)
+
+
warn_patterns = [
# pylint:disable=line-too-long,g-inconsistent-quotes
# aapt warnings
@@ -115,6 +119,14 @@ warn_patterns = [
kotlin('library has Kotlin runtime',
[r".*: warning: library has Kotlin runtime bundled into it",
r".*: warning: some JAR files .* have the Kotlin Runtime library"]),
+ # Yacc warnings
+ yacc('deprecate directive',
+ [r".*\.yy?:.*: warning: deprecated directive: "]),
+ yacc('shift/reduce conflicts',
+ [r".*\.yy?: warning: .+ shift/reduce conflicts "]),
+ {'category': 'yacc', 'severity': Severity.SKIP,
+ 'description': 'yacc: fix-its can be applied',
+ 'patterns': [r".*\.yy?: warning: fix-its can be applied."]},
# Rust warnings
{'category': 'Rust', 'severity': Severity.HIGH,
'description': 'Rust: Does not derive Copy',