Skip to content

Commit 93f3d4c

Browse files
authored
fix: use --force-exclude with Ruff (#348)
1 parent bf109f0 commit 93f3d4c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

lua/conform/formatters/ruff_fix.lua

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
---@type conform.FileFormatterConfig
22
return {
33
meta = {
4-
url = "https://beta.ruff.rs/docs/",
4+
url = "https://docs.astral.sh/ruff/",
55
description = "An extremely fast Python linter, written in Rust. Fix lint errors.",
66
},
77
command = "ruff",
88
args = {
9+
"check",
910
"--fix",
10-
"-e",
11-
"-n",
11+
"--force-exclude",
12+
"--exit-zero",
13+
"--no-cache",
1214
"--stdin-filename",
1315
"$FILENAME",
1416
"-",
@@ -17,5 +19,6 @@ return {
1719
cwd = require("conform.util").root_file({
1820
"pyproject.toml",
1921
"ruff.toml",
22+
".ruff.toml",
2023
}),
2124
}
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---@type conform.FileFormatterConfig
22
return {
33
meta = {
4-
url = "https://beta.ruff.rs/docs/",
4+
url = "https://docs.astral.sh/ruff/",
55
description = "An extremely fast Python linter, written in Rust. Formatter subcommand.",
66
},
77
command = "ruff",
88
args = {
99
"format",
10+
"--force-exclude",
1011
"--stdin-filename",
1112
"$FILENAME",
1213
"-",
@@ -15,5 +16,6 @@ return {
1516
cwd = require("conform.util").root_file({
1617
"pyproject.toml",
1718
"ruff.toml",
19+
".ruff.toml",
1820
}),
1921
}

0 commit comments

Comments
 (0)