pydistcheck icon indicating copy to clipboard operation
pydistcheck copied to clipboard

'make lint' reports errors in build/ directory

Open jameslamb opened this issue 3 years ago • 0 comments

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:

  1. it is wasted time and processing (since the errors raised will be identical to those raised on the code in src/)
  2. it adds visual noise to the make lint logs 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.

jameslamb avatar Nov 25 '22 05:11 jameslamb