diff --git a/README.md b/README.md index 1daff088453e7..55c66322e494a 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,7 @@ exclude = [ ".direnv", ".eggs", ".git", + ".git-rewrite", ".hg", ".mypy_cache", ".nox", diff --git a/crates/ruff/src/settings/defaults.rs b/crates/ruff/src/settings/defaults.rs index d5398ef14953d..99b9bed3f8681 100644 --- a/crates/ruff/src/settings/defaults.rs +++ b/crates/ruff/src/settings/defaults.rs @@ -38,6 +38,7 @@ pub static EXCLUDE: Lazy> = Lazy::new(|| { FilePattern::Builtin(".direnv"), FilePattern::Builtin(".eggs"), FilePattern::Builtin(".git"), + FilePattern::Builtin(".git-rewrite"), FilePattern::Builtin(".hg"), FilePattern::Builtin(".mypy_cache"), FilePattern::Builtin(".nox"), diff --git a/crates/ruff/src/settings/options.rs b/crates/ruff/src/settings/options.rs index 44511cc7c75f2..b9248c6eeb7e8 100644 --- a/crates/ruff/src/settings/options.rs +++ b/crates/ruff/src/settings/options.rs @@ -71,7 +71,7 @@ pub struct Options { /// default expression matches `_`, `__`, and `_var`, but not `_var_`. pub dummy_variable_rgx: Option, #[option( - default = r#"[".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv"]"#, + default = r#"[".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv"]"#, value_type = "list[str]", example = r#" exclude = [".venv"] diff --git a/docs/configuration.md b/docs/configuration.md index f9ad5e77127b8..545faaecd06c8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -25,6 +25,7 @@ exclude = [ ".direnv", ".eggs", ".git", + ".git-rewrite", ".hg", ".mypy_cache", ".nox", @@ -303,7 +304,7 @@ extend = "../pyproject.toml" line-length = 100 ``` -All of the above rules apply equivalently to `ruff.toml` and `.ruff.toml` files. If Ruff detects +All of the above rules apply equivalently to `ruff.toml` and `.ruff.toml` files. If Ruff detects multiple configuration files in the same directory, the `.ruff.toml` file will take precedence over the `ruff.toml` file, and the `ruff.toml` file will take precedence over the `pyproject.toml` file.