summaryrefslogtreecommitdiff
path: root/tools/warn/tidy_warn_patterns.py
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2021-04-28 14:49:32 -0700
committer Chih-Hung Hsieh <chh@google.com> 2021-04-28 14:57:56 -0700
commit98b285dafb90b7136dadc55c534888e7155205b1 (patch)
treeba8524383d249a17236706f439c9fe7a4b0d1396 /tools/warn/tidy_warn_patterns.py
parenta6d2d8c79a1d51d3066ca26d6b08e26717ffa012 (diff)
Fix/suppress most pylint and gpylint warnings
* Add missing function doc strings. Suppress this warning on trivial functions in *_warn_patterns.py. * Remove unused g-importing-memeber, g-complex-comprehension. * Suppress pylint warning on unrecognized g-* options. * Suppress too-few-public-methods warnings on simple classes. * Suppress too-many-arguments and missing-function-docstring in html_writer.py, which will be refactored later. * Fix bad naming, long lines and line breaks, and bad quotes. Test: compare output for build.log Change-Id: Icdb34f014a10ec1e642c2cfe8003fc3ae245b507
Diffstat (limited to 'tools/warn/tidy_warn_patterns.py')
-rw-r--r--tools/warn/tidy_warn_patterns.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/warn/tidy_warn_patterns.py b/tools/warn/tidy_warn_patterns.py
index 5416cb23d7..7018d1089a 100644
--- a/tools/warn/tidy_warn_patterns.py
+++ b/tools/warn/tidy_warn_patterns.py
@@ -15,8 +15,10 @@
"""Warning patterns for clang-tidy."""
+# No need of doc strings for trivial small functions.
+# pylint:disable=missing-function-docstring
+
# pylint:disable=relative-beyond-top-level
-# pylint:disable=g-importing-member
from .cpp_warn_patterns import compile_patterns
from .severity import Severity
@@ -39,7 +41,6 @@ def group_tidy_warn_pattern(description):
def analyzer_high(description, patterns):
- # Important clang analyzer warnings to be fixed ASAP.
return {
'category': 'C/C++',
'severity': Severity.HIGH,
@@ -74,7 +75,8 @@ def analyzer_group_check(check):
warn_patterns = [
- # pylint:disable=line-too-long,g-inconsistent-quotes
+ # pylint does not recognize g-inconsistent-quotes
+ # pylint:disable=line-too-long,bad-option-value,g-inconsistent-quotes
group_tidy_warn_pattern('android'),
simple_tidy_warn_pattern('abseil-string-find-startswith'),
simple_tidy_warn_pattern('bugprone-argument-comment'),