Closed iham closed 6 years ago
I just realized that, if we use this in a project buildout, we don't have a setup.cfg, so we will need a tox.ini or a .flake8 file. I would vote for using the tox.ini, as we will use this more and more in packages and buildout anyway. Because of that, we will add a tox file by default to addon's created by bobtemplates.plone/plonecli. As this is already merged and released, I'll close this issue.
A small correction, the tox.ini has to be in the project folder, not in the addon package root. So we can add it to the buildout template, but that need refacturing anyway. Just for documentation, the project needs a config like this in the tox.ini:
[flake8]
exclude = bootstrap.py,boostrap-buildout.py,docs,*.egg,lib,bin,parts
max-complexity = 10
max-line-length = 80
flake can use setup.cfg, tox.ini or .flake for configuring parameters like "max-line-length" editors like sublime text, eclipse, vs code, etc can use this files too. setup.cfg seems to be the most common as this file is widely used (isort, manifest, distutils, ...)
sadly, this file is ignored when parameters are set during script-calls (see bin/code-analysis-flake8) even if they are not set, default values will be added to code-analysis-flake8 and the setup.cfg can't be used
in order to not duplicate code, it would be nice to only use the setup.cfg and skip flake8 configuration in buildout completely.