lorax/tests/pylint/runpylint.py

34 lines
1.0 KiB
Python
Raw Normal View History

#!/usr/bin/python3
import sys
from pocketlint import FalsePositive, PocketLintConfig, PocketLinter
class LoraxLintConfig(PocketLintConfig):
def __init__(self):
PocketLintConfig.__init__(self)
self.falsePositives = [ FalsePositive(r"Module 'pylorax' has no 'version' member"),
2018-05-03 21:10:05 +00:00
FalsePositive(r"Catching too general exception Exception"),
2018-05-04 18:35:31 +00:00
FalsePositive(r"Module 'composer' has no 'version' member"),
]
@property
def pylintPlugins(self):
retval = super(LoraxLintConfig, self).pylintPlugins
# Not using threads so we can skip this
retval.remove("pocketlint.checkers.environ")
# No markup used
retval.remove("pocketlint.checkers.markup")
return retval
@property
def ignoreNames(self):
return { "bots", "rpmbuild" }
if __name__ == "__main__":
conf = LoraxLintConfig()
linter = PocketLinter(conf)
rc = linter.run()
sys.exit(rc)