diff --git a/.sqlfluff b/.sqlfluff deleted file mode 100644 index 391f553..0000000 --- a/.sqlfluff +++ /dev/null @@ -1,6 +0,0 @@ -[sqlfluff] -dialect = postgres -# LT05 (line too long) is unfixable for long function signatures and seed -# rows, which makes `sqlfluff format` exit non-zero. Exclude it so it acts -# purely as a formatter under treefmt. -exclude_rules = LT05 diff --git a/devenv.nix b/devenv.nix index ed18882..ead0fce 100644 --- a/devenv.nix +++ b/devenv.nix @@ -24,10 +24,8 @@ "app:check".exec = "bin/rake"; # default: test + mutate_since }; - # treefmt drives all formatters (Ruby via syntax_tree, SQL via sqlfluff). treefmt.enable = true; treefmt.config = { - projectRootFile = "devenv.nix"; settings.formatter = { ruby = { command = "stree"; @@ -36,7 +34,13 @@ }; sql = { command = "sqlfluff"; - options = [ "format" ]; + options = [ + "format" + "--dialect" + "postgres" + "--exclude-rules" + "LT05" + ]; includes = [ "db/**/*.sql" ]; }; };