summaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/ruff_fix.lua
blob: e6ccfece42e254fe3bd30dabe308e5e8c3f4c5d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---@type conform.FileFormatterConfig
return {
  meta = {
    url = "https://beta.ruff.rs/docs/",
    description = "An extremely fast Python linter, written in Rust. Fix lint errors.",
  },
  command = "ruff",
  args = {
    "--fix",
    "-e",
    "-n",
    "--stdin-filename",
    "$FILENAME",
    "-",
  },
  stdin = true,
  cwd = require("conform.util").root_file({
    "pyproject.toml",
    "ruff.toml",
  }),
}