summaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/sqlfluff.lua
blob: 23441c20f334982a99e67d6c71417dae53a58939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local util = require("conform.util")

---@type conform.FileFormatterConfig
return {
  meta = {
    url = "https://github.com/sqlfluff/sqlfluff",
    description = "A modular SQL linter and auto-formatter with support for multiple dialects and templated code.",
  },
  command = "sqlfluff",
  args = { "fix", "--dialect=ansi", "-" },
  stdin = true,
  cwd = util.root_file({
    ".sqlfluff",
    "pep8.ini",
    "pyproject.toml",
    "setup.cfg",
    "tox.ini",
  }),
  require_cwd = false,
}