Skip to content

Commit

Permalink
feat: add support for sqlfluff (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuchlak committed Nov 27, 2023
1 parent db9da1a commit e8c8683
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lua/conform/formatters/sqlfluff.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,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", "--force", "--dialect=ansi", "-" },
stdin = true,
cwd = util.root_file({
".sqlfluff",
"pep8.ini",
"pyproject.toml",
"setup.cfg",
"tox.ini",
}),
require_cwd = false,
}

0 comments on commit e8c8683

Please sign in to comment.