mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
7d7b044432
* Remove webpack and merge * Put postgresql_version line back in cookiecutter.json * Put goldhand back in contributors file, added ssteinerX * Add *.egginfo to .gitignore * Fix dangling endif in README.rst
43 lines
1.0 KiB
ReStructuredText
43 lines
1.0 KiB
ReStructuredText
Linters
|
|
=======
|
|
|
|
.. index:: linters
|
|
|
|
|
|
flake8
|
|
-------
|
|
|
|
To run flake8:
|
|
|
|
$ 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
|
|
------
|
|
|
|
This is included in flake8's checks, but you can also run it separately to see a more detailed report:
|
|
|
|
$ pylint <python files that you wish to lint>
|
|
|
|
The config for pylint is located in .pylintrc. It specifies:
|
|
|
|
* Use the pylint_common and pylint_django plugins. If using Celery, also use pylint_celery.
|
|
* Set max line length to 120 chars
|
|
* Disable linting messages for missing docstring and invalid name
|
|
* max-parents=13
|
|
|
|
pep8
|
|
-----
|
|
|
|
This is included in flake8's checks, but you can also run it separately to see a more detailed report:
|
|
|
|
$ pep8 <python files that you wish to lint>
|
|
|
|
The config for pep8 is located in setup.cfg. It specifies:
|
|
|
|
* Set max line length to 120 chars
|
|
* Exclude .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules |