pydistcheck
pydistcheck copied to clipboard
'make lint' reports errors in build/ directory
Running something like
pip install .
from the root of this repo creates a build/ directory which contains a copy of the library's source code.
flake8 and other static analyzers will then check that directory when running e.g. make lint, which is undesirable because:
- it is wasted time and processing (since the errors raised will be identical to those raised on the code in
src/) - it adds visual noise to the
make lintlogs that makes it more difficult to understand exactly what to fix
For example:
./build/lib/pydistcheck/cli.py:116:30: C414 Unnecessary list call within sorted().
./src/pydistcheck/cli.py:116:30: C414 Unnecessary list call within sorted().
How to fix this
Add configuration to setup.cfg and pyproject.toml to exclude the build/ directory from flake8, mypy, black, and pylint.