Skip to content

Commit ac2d07e

Browse files
authored
Mention force-exclude in "Configuration > Python file discovery" (#21500)
1 parent 8156b45 commit ac2d07e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,9 @@ formatting `.pyi` files, but would continue to include them in linting:
345345
By default, Ruff will also skip any files that are omitted via `.ignore`, `.gitignore`,
346346
`.git/info/exclude`, and global `gitignore` files (see: [`respect-gitignore`](settings.md#respect-gitignore)).
347347

348-
Files that are passed to `ruff` directly are always analyzed, regardless of the above criteria.
349-
For example, `ruff check /path/to/excluded/file.py` will always lint `file.py`.
348+
Files that are passed to `ruff` directly are always analyzed, regardless of the above criteria,
349+
unless [`force-exclude`](settings.md#force-exclude) is also enabled (via CLI or settings file).
350+
For example, without `force-exclude` enabled, `ruff check /path/to/excluded/file.py` will always lint `file.py`.
350351

351352
### Default inclusions
352353

0 commit comments

Comments
 (0)