File tree 3 files changed +16
-8
lines changed
3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ func TestReadConfigFile(t *testing.T) {
52
52
as .Equal ([]string {"*.hs" }, haskell .Includes )
53
53
as .Equal ([]string {"examples/haskell/" }, haskell .Excludes )
54
54
55
- // nix
56
- nix , ok := cfg .Formatters ["nix " ]
57
- as .True (ok , "nix formatter not found" )
58
- as .Equal ("alejandra" , nix .Command )
59
- as .Nil (nix .Options )
60
- as .Equal ([]string {"*.nix" }, nix .Includes )
61
- as .Equal ([]string {"examples/nix/sources.nix" }, nix .Excludes )
55
+ // alejandra
56
+ alejandra , ok := cfg .Formatters ["alejandra " ]
57
+ as .True (ok , "alejandra formatter not found" )
58
+ as .Equal ("alejandra" , alejandra .Command )
59
+ as .Nil (alejandra .Options )
60
+ as .Equal ([]string {"*.nix" }, alejandra .Includes )
61
+ as .Equal ([]string {"examples/nix/sources.nix" }, alejandra .Excludes )
62
62
63
63
// ruby
64
64
ruby , ok := cfg .Formatters ["ruby" ]
Original file line number Diff line number Diff line change @@ -12,5 +12,7 @@ with pkgs; [
12
12
rustfmt
13
13
shellcheck
14
14
shfmt
15
+ statix
16
+ deadnix
15
17
terraform
16
18
]
Original file line number Diff line number Diff line change @@ -26,11 +26,17 @@ options = [
26
26
includes = [" *.hs" ]
27
27
excludes = [" examples/haskell/" ]
28
28
29
- [formatter .nix ]
29
+ [formatter .alejandra ]
30
30
command = " alejandra"
31
31
includes = [" *.nix" ]
32
32
# Act as an example on how to exclude specific files
33
33
excludes = [" examples/nix/sources.nix" ]
34
+ # Make this run before deadnix
35
+ # Note this formatter determines the file set for any 'downstream' formatters
36
+ before = " deadnix"
37
+
38
+ [formatter .deadnix ]
39
+ command = " deadnix"
34
40
35
41
[formatter .ruby ]
36
42
command = " rufo"
You can’t perform that action at this time.
0 commit comments