Skip to content

Commit

Permalink
Add pocketlint support to python-meh.
Browse files Browse the repository at this point in the history
  • Loading branch information
clumens committed Jul 16, 2015
1 parent 55f62ce commit b276a46
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -33,6 +33,9 @@ test:
@echo "*** Running unittests with Python 3 ***"
PYTHONPATH=. $(PYTHON3) $(TESTSUITE) -v

check:
PYTHONPATH=. tests/pylint/runpylint.py

install:
$(PYTHON) setup.py install --root=$(DESTDIR)
$(MAKE) -C po install
Expand Down
1 change: 1 addition & 0 deletions python-meh.spec
Expand Up @@ -36,6 +36,7 @@ BuildRequires: python3-setuptools
BuildRequires: python3-dbus
BuildRequires: libreport-python3 >= %{libreportver}
BuildRequires: python3-six
BuildRequires: python3-pocketlint
%endif

Requires: python
Expand Down
20 changes: 20 additions & 0 deletions tests/pylint/runpylint.py
@@ -0,0 +1,20 @@
#!/usr/bin/python3

import os

from pocketlint import PocketLintConfig, PocketLinter

class MehLintConfig(PocketLintConfig):
@property
def pylintPlugins(self):
retval = super(MehLintConfig, self).pylintPlugins
retval.remove("pocketlint.checkers.eintr")
retval.remove("pocketlint.checkers.markup")
return retval

if __name__ == "__main__":
conf = MehLintConfig()
linter = PocketLinter(conf)
rc = linter.run()
os._exit(rc)

0 comments on commit b276a46

Please sign in to comment.