Feature parity with treefmt.rs #22
@ -52,13 +52,13 @@ func TestReadConfigFile(t *testing.T) {
|
|||||||
as.Equal([]string{"*.hs"}, haskell.Includes)
|
as.Equal([]string{"*.hs"}, haskell.Includes)
|
||||||
as.Equal([]string{"examples/haskell/"}, haskell.Excludes)
|
as.Equal([]string{"examples/haskell/"}, haskell.Excludes)
|
||||||
|
|
||||||
// nix
|
// alejandra
|
||||||
nix, ok := cfg.Formatters["nix"]
|
alejandra, ok := cfg.Formatters["alejandra"]
|
||||||
as.True(ok, "nix formatter not found")
|
as.True(ok, "alejandra formatter not found")
|
||||||
as.Equal("alejandra", nix.Command)
|
as.Equal("alejandra", alejandra.Command)
|
||||||
as.Nil(nix.Options)
|
as.Nil(alejandra.Options)
|
||||||
as.Equal([]string{"*.nix"}, nix.Includes)
|
as.Equal([]string{"*.nix"}, alejandra.Includes)
|
||||||
as.Equal([]string{"examples/nix/sources.nix"}, nix.Excludes)
|
as.Equal([]string{"examples/nix/sources.nix"}, alejandra.Excludes)
|
||||||
|
|
||||||
// ruby
|
// ruby
|
||||||
ruby, ok := cfg.Formatters["ruby"]
|
ruby, ok := cfg.Formatters["ruby"]
|
||||||
|
@ -12,5 +12,7 @@ with pkgs; [
|
|||||||
rustfmt
|
rustfmt
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
|
statix
|
||||||
|
deadnix
|
||||||
terraform
|
terraform
|
||||||
]
|
]
|
||||||
|
@ -26,11 +26,17 @@ options = [
|
|||||||
includes = ["*.hs"]
|
includes = ["*.hs"]
|
||||||
excludes = ["examples/haskell/"]
|
excludes = ["examples/haskell/"]
|
||||||
|
|
||||||
[formatter.nix]
|
[formatter.alejandra]
|
||||||
command = "alejandra"
|
command = "alejandra"
|
||||||
includes = ["*.nix"]
|
includes = ["*.nix"]
|
||||||
# Act as an example on how to exclude specific files
|
# Act as an example on how to exclude specific files
|
||||||
excludes = ["examples/nix/sources.nix"]
|
excludes = ["examples/nix/sources.nix"]
|
||||||
|
# Make this run before deadnix
|
||||||
|
# Note this formatter determines the file set for any 'downstream' formatters
|
||||||
|
before = "deadnix"
|
||||||
|
|
||||||
|
[formatter.deadnix]
|
||||||
|
command = "deadnix"
|
||||||
|
|
||||||
[formatter.ruby]
|
[formatter.ruby]
|
||||||
command = "rufo"
|
command = "rufo"
|
||||||
|
Reference in New Issue
Block a user