Refactoring and more pylint-related changes.
[joel/kofoto.git] / check.py
1 #! /usr/bin/env python
2
3 import sys
4 from pylint import lint
5
6 sys.path.insert(0, "src/packages")
7 if len(sys.argv) > 1:
8     modules = sys.argv[1:]
9 else:
10     modules = ["kofoto", "kofoto.commandline", "kofoto.output"]
11
12 tests_to_disable = [
13     "C0101", # "Too short variable name."
14     "W0142", # "Used * or ** magic."
15     "W0704", # "Except doesn't do anything."
16 ]
17
18 lint.Run(
19     ["--rcfile", "misc/pylintrc"] +
20     ["--disable-msg=" + x for x in tests_to_disable] +
21     modules)