From ac2d07e83c0d30358add8821ae2cc3463e20f104 Mon Sep 17 00:00:00 2001 From: Josh Cannon Date: Mon, 17 Nov 2025 10:15:07 -0600 Subject: [PATCH] Mention `force-exclude` in "Configuration > Python file discovery" (#21500) --- docs/configuration.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 7a5f62fc60..3420611e18 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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