![Ricardo Martincoski](/assets/img/avatar_default.png)
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>
19 lines
456 B
Python
19 lines
456 B
Python
# 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
|
|
|
|
def check_line(self, lineno, text):
|
|
pass
|
|
|
|
def after(self):
|
|
pass
|