diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-04-18 17:06:52 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-04-18 17:13:28 +0300 |
commit | 5dce4e1d7000ab08e30ef71f874db0e40e8889b1 (patch) | |
tree | 5496bd992379c9b892a020d5f4104b66b933f236 /setup.py | |
parent | 13aad69bcb3027e5d1b28ef8c1b316767e8b0b10 (diff) | |
download | distix-5dce4e1d7000ab08e30ef71f874db0e40e8889b1.tar.gz |
Run pylint as well as pep8 on the source; fix things
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -33,12 +33,14 @@ class Check(Command): ('unit-tests', 'u', 'run unit tests?'), ('yarns', 'y', 'run yarn tests locally?'), ('pep8', '8', 'run pep8 on the source?'), + ('pylint', 'l', 'run pylint on the source?'), ] def set_all_options(self, new_value): self.unit_tests = new_value self.yarns = new_value self.pep8 = new_value + self.pylint = new_value def initialize_options(self): self.set_all_options(False) @@ -47,7 +49,8 @@ class Check(Command): any_set = ( self.unit_tests or self.yarns or - self.pep8) + self.pep8 or + self.pylint) if not any_set: self.set_all_options(True) @@ -61,6 +64,9 @@ class Check(Command): if self.pep8 and self.command_is_available('pep8'): self.run_pep8() + if self.pylint and self.command_is_available('pylint'): + self.run_pylint() + def run_unit_tests(self): cliapp.runcmd( ['python', '-m', 'CoverageTestRunner', @@ -81,6 +87,11 @@ class Check(Command): def run_pep8(self): cliapp.runcmd(['pep8', 'distixlib'], stdout=None, stderr=None) + def run_pylint(self): + cliapp.runcmd( + ['pylint', '--rcfile=pylint.conf', 'distixlib'], + stdout=None, stderr=None) + setup(name='distix', version=distixlib.version.version_string, |