Django, Jenkins and PyLint looking at everything
Question
I am currently running Jenkins CI with pylint to look at a Django project I've been working on. One thing I have been frustrated by is pylint reporting for all the central django modules I import, meaning that my own project files get buried within mounds of other django modules (e.g. /usr/local/lib/python2.6/dist-packages/django/contrib/admin/options.py, which gives 67 violations alone).
Is there a way to make it less indiscriminate and just look at the files related to my project, or does it always have to recurse through all imports?
Thanks,
J
Solution
Right, well thanks to the creator of Django_Jenkins (kmmbvnr) the correct way to get it to look at only your project's files is to use the following:
In settings.py, you need:
PROJECT_APPS=(
'appname',
)
And that sorts out the searching through every dependency out there.
Hope that helps!
J
OTHER TIPS
From pylint's docs:
Command line options
...
--ignore=file
Add (may be a directory) to the black list. It should be a base name, not a path. You may set this option multiple times.
so:
pylint . --ignore=django
would probably solve your problems.