aboutsummaryrefslogtreecommitdiff
path: root/utils/checkpackagelib
diff options
context:
space:
mode:
authorGravatar Ricardo Martincoski <ricardo.martincoski@gmail.com>2019-01-27 16:59:41 -0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2019-01-29 16:37:47 +0100
commit4a6c5ab2c31f732802a7ac643ca6335821d6d38f (patch)
tree79838f2381ab34be2904fb71b0668183a9487715 /utils/checkpackagelib
parent908a8b5a7fb5744c55adbe609dca991709b2181a (diff)
downloadbuildroot-4a6c5ab2c31f732802a7ac643ca6335821d6d38f.tar.gz
buildroot-4a6c5ab2c31f732802a7ac643ca6335821d6d38f.tar.bz2
utils/check-package: allow to disable warning for a line
Currently any exceptions for a check function need to be coded into the check-package script itself. Create a pattern that can be used in a comment to make check-package ignore one or more warning types in the line immediately below: # check-package Indent, VariableWithBraces Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'utils/checkpackagelib')
-rw-r--r--utils/checkpackagelib/base.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/checkpackagelib/base.py b/utils/checkpackagelib/base.py
index fc09bec9a2..9544a64e5a 100644
--- a/utils/checkpackagelib/base.py
+++ b/utils/checkpackagelib/base.py
@@ -1,10 +1,12 @@
# See utils/checkpackagelib/readme.txt before editing this file.
+import re
class _CheckFunction(object):
def __init__(self, filename, url_to_manual):
self.filename = filename
self.url_to_manual = url_to_manual
+ self.disable = re.compile(r"^\s*# check-package .*\b{}\b".format(self.__class__.__name__))
def before(self):
pass