2015-05-08 23:20:39 +00:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from pocketlint import FalsePositive, PocketLintConfig, PocketLinter
|
|
|
|
|
|
|
|
class LoraxLintConfig(PocketLintConfig):
|
|
|
|
def __init__(self):
|
|
|
|
PocketLintConfig.__init__(self)
|
|
|
|
|
2017-10-05 10:22:52 +00:00
|
|
|
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"),
|
2019-08-08 16:57:57 +00:00
|
|
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1739167
|
|
|
|
FalsePositive(r"Module 'rpm' has no '.*' member"),
|
2015-05-08 23:20:39 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
@property
|
|
|
|
def pylintPlugins(self):
|
|
|
|
retval = super(LoraxLintConfig, self).pylintPlugins
|
2016-02-04 16:30:18 +00:00
|
|
|
# Not using threads so we can skip this
|
2015-05-08 23:20:39 +00:00
|
|
|
retval.remove("pocketlint.checkers.environ")
|
|
|
|
# No markup used
|
|
|
|
retval.remove("pocketlint.checkers.markup")
|
|
|
|
return retval
|
|
|
|
|
2019-04-12 18:17:28 +00:00
|
|
|
@property
|
|
|
|
def ignoreNames(self):
|
|
|
|
return { "bots", "rpmbuild" }
|
|
|
|
|
2015-05-08 23:20:39 +00:00
|
|
|
if __name__ == "__main__":
|
|
|
|
conf = LoraxLintConfig()
|
|
|
|
linter = PocketLinter(conf)
|
|
|
|
rc = linter.run()
|
|
|
|
sys.exit(rc)
|