Pylint ====== We're using `Pylint `_ to do *most* of the linting of Python files. Pylint config ------------- Please have a look at the latest `Pylint config `_ for all the configured options. .. hint:: To see all available configuration options, have a look at the `Pylint documentation `_. bad-whitespace ~~~~~~~~~~~~~~ Because of :ref:`Variable assignment alignment`, we've to disable this check. .. hint:: Unfortunately, Pylint only allows us to disable the complete whitespaces check and not only the variable assignment checks. However, we use :ref:`pycodestyle` to check the other assignments. wrong-import-order ~~~~~~~~~~~~~~~~~~ We're using :ref:`isort` for import checks and Pylint will fail, as we've separate sections in :ref:`isort`. duplicate-code ~~~~~~~~~~~~~~ We're deactivating the check for duplicate code, because this triggers too many times. This is quite common in Django projects. Pylint Makefile --------------- To run ``pylint`` in your project, use the following ``Makefile`` target: .. code-block:: Makefile LINTER_CONFIGS = https://git.confirm.ch/confirm/guidelines/raw/master/configs test-pylint: curl -sSfLo .pylintrc $(LINTER_CONFIGS)/pylintrc pylint $(SOURCE_DIR)