aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/ruff_format.lua
blob: 20a2e95275e97fc1ddaa68ff1ef12532df3fd44d (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://docs.astral.sh/ruff/",
    description = "An extremely fast Python linter, written in Rust. Formatter subcommand.",
  },
  command = "ruff",
  args = {
    "format",
    "--force-exclude",
    "--stdin-filename",
    "$FILENAME",
    "-",
  },
  stdin = true,
  cwd = require("conform.util").root_file({
    "pyproject.toml",
    "ruff.toml",
    ".ruff.toml",
  }),
}