diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 301e24e5..676614d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,6 +31,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install --upgrade build coveralls setuptools tox wheel + python -m pip install -r requirements.txt - name: Build Vulture wheel run: python -m build diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ec6de8..28b0693b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Bump flake8, flake8-comprehensions and flake8-bugbear (Sebastian Csar, #341). * Switch to tomllib/tomli to support heterogeneous arrays (Sebastian Csar, #340). * Provide whitelist parity for `MagicMock` and `Mock` (maxrake). +* Use .gitignore to exclude files if --exclude is missing from both pyproject.toml and the command line (whosayn, #344, #345). # 2.10 (2023-10-06) diff --git a/README.md b/README.md index 99b2ec81..e531d8ef 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,10 @@ If you want to ignore a whole file or directory, use the `--exclude` parameter (e.g., `--exclude "*settings.py,*/docs/*.py,*/test_*.py,*/.venv/*.py"`). The exclude patterns are matched against absolute paths. +Vulture 2.11+ parses the `.gitignore` file in the current working directory for +exclude patterns if the `--exclude` parameter is unused and if there are no +exclude patterns in the pyproject.toml file. + #### Flake8 noqa comments