Skip to content

Commit

Permalink
fix: use --force-exclude with Ruff (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvmanila committed Mar 25, 2024
1 parent bf109f0 commit 93f3d4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lua/conform/formatters/ruff_fix.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://beta.ruff.rs/docs/",
url = "https://docs.astral.sh/ruff/",
description = "An extremely fast Python linter, written in Rust. Fix lint errors.",
},
command = "ruff",
args = {
"check",
"--fix",
"-e",
"-n",
"--force-exclude",
"--exit-zero",
"--no-cache",
"--stdin-filename",
"$FILENAME",
"-",
Expand All @@ -17,5 +19,6 @@ return {
cwd = require("conform.util").root_file({
"pyproject.toml",
"ruff.toml",
".ruff.toml",
}),
}
4 changes: 3 additions & 1 deletion lua/conform/formatters/ruff_format.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://beta.ruff.rs/docs/",
url = "https://docs.astral.sh/ruff/",
description = "An extremely fast Python linter, written in Rust. Formatter subcommand.",
},
command = "ruff",
args = {
"format",
"--force-exclude",
"--stdin-filename",
"$FILENAME",
"-",
Expand All @@ -15,5 +16,6 @@ return {
cwd = require("conform.util").root_file({
"pyproject.toml",
"ruff.toml",
".ruff.toml",
}),
}

0 comments on commit 93f3d4c

Please sign in to comment.