Ronny Pfannschmidt avatar Ronny Pfannschmidt committed 35e51c4

code update, use ini file to list the checkers, make a opt-out option (breaks tests!)

Comments (0)

Files changed (2)

codecheckers/plugin.py

         self.name += '[code-check]'
 
     def collect(self):
-        checkers = py.test.config.getvalue('codecheck')
+        if self.config.option.no_codechecks:
+            return []
+        checkers = self.config.getini('codechecks')
         entrypoints = pkg_resources.iter_entry_points('codechecker')
+        #XXX: list wanted checkers we didnt get
         return [PyCodeCheckItem(ep, self) for ep in entrypoints if ep.name in checkers]
 
 
 
 
 def pytest_addoption(parser):
-    parser.addoption('--codecheck', action='append', default=[])
+    parser.addini('codechecks', type='args', help='listings of the codechecks to use')
+    parser.addoption('--no-codechecks', action='store_true')
+[pytest]
+codechecks = pep8 pyflakes
 [tox]
 indexserver =
     default = http://pypi.testrun.org
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.