cookiecutter-django/docs/linters.rst

44 lines
961 B
ReStructuredText
Raw Normal View History

2015-09-18 20:20:48 +03:00
Linters
=======
.. index:: linters
2015-09-24 10:38:04 +03:00
flake8
------
2015-09-24 10:38:04 +03:00
To run flake8: ::
2015-09-24 10:38:04 +03:00
$ flake8
The config for flake8 is located in setup.cfg. It specifies:
* Set max line length to 120 chars
* Exclude ``.tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules``
pylint
------
To run pylint: ::
$ pylint <python files that you wish to lint>
2015-09-26 10:50:54 +03:00
The config for pylint is located in .pylintrc. It specifies:
* Use the pylint_django plugin. If using Celery, also use pylint_celery.
2015-09-26 10:50:54 +03:00
* Set max line length to 120 chars
* Disable linting messages for missing docstring and invalid name
* max-parents=13
pycodestyle
-----------
This is included in flake8's checks, but you can also run it separately to see a more detailed report: ::
$ pycodestyle <python files that you wish to lint>
2015-09-26 10:50:54 +03:00
The config for pycodestyle is located in setup.cfg. It specifies:
2015-09-26 10:50:54 +03:00
* Set max line length to 120 chars
* Exclude ``.tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules``