Mention force-exclude in "Configuration > Python file discovery" (#21500)

This commit is contained in:
Josh Cannon 2025-11-17 10:15:07 -06:00 committed by GitHub
parent 8156b45173
commit ac2d07e83c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -345,8 +345,9 @@ formatting `.pyi` files, but would continue to include them in linting:
By default, Ruff will also skip any files that are omitted via `.ignore`, `.gitignore`,
`.git/info/exclude`, and global `gitignore` files (see: [`respect-gitignore`](settings.md#respect-gitignore)).
Files that are passed to `ruff` directly are always analyzed, regardless of the above criteria.
For example, `ruff check /path/to/excluded/file.py` will always lint `file.py`.
Files that are passed to `ruff` directly are always analyzed, regardless of the above criteria,
unless [`force-exclude`](settings.md#force-exclude) is also enabled (via CLI or settings file).
For example, without `force-exclude` enabled, `ruff check /path/to/excluded/file.py` will always lint `file.py`.
### Default inclusions