|
1 | 1 | .PHONY: requires_nix_shell format-staged \ |
2 | 2 | unreachable-commit-staged format-whitespace-staged format-nix-staged \ |
3 | | - format-hs-staged format-cabal-staged format-purs-staged format-js-staged \ |
4 | | - format-dhall-staged check-format-hs-staged check-format-cabal-staged \ |
5 | | - check-format-purs-staged check-format-js-staged check-format-dhall-staged \ |
| 3 | + format-hs-staged format-cabal-staged \ |
| 4 | + check-format-hs-staged check-format-cabal-staged \ |
6 | 5 | check-format-nix-staged check-format-whitespace |
7 | 6 |
|
8 | 7 | current-system := $(shell nix eval --impure --expr builtins.currentSystem) |
@@ -31,12 +30,6 @@ format-staged: unreachable-commit-staged requires_nix_shell |
31 | 30 | @$(MAKE) --no-print-directory format-cabal-staged |
32 | 31 | @echo 'Formatting whitespace...' |
33 | 32 | @$(MAKE) --no-print-directory format-whitespace-staged |
34 | | - @echo 'Formatting `*.purs`...' |
35 | | - @$(MAKE) --no-print-directory format-purs-staged |
36 | | - @echo 'Formatting `*.js`...' |
37 | | - @$(MAKE) --no-print-directory format-js-staged |
38 | | - @echo 'Formatting `*.dhall`...' |
39 | | - @$(MAKE) --no-print-directory format-dhall-staged |
40 | 33 | @echo 'Formatting `*.nix` files...' |
41 | 34 | @$(MAKE) --no-print-directory format-nix-staged |
42 | 35 |
|
@@ -119,39 +112,6 @@ check-format-cabal-staged: requires_nix_shell |
119 | 112 | | grep -Ez '^.*\.cabal$$'\ |
120 | 113 | | xargs -0 -r cabal-fmt --check |
121 | 114 |
|
122 | | -format-purs-staged: requires_nix_shell |
123 | | - @git diff -z --name-only --diff-filter=d --cached HEAD\ |
124 | | - | grep -Ez '^.*\.purs$$'\ |
125 | | - | while IFS= read -r -d '' FILE; do test -f $$FILE && printf "$$FILE\0"; done\ |
126 | | - | xargs -0 -r purs-tidy format-in-place |
127 | | - |
128 | | -check-format-purs-staged: requires_nix_shell |
129 | | - @git diff -z --name-only --diff-filter=d --cached HEAD\ |
130 | | - | grep -Ez '^.*\.purs$$'\ |
131 | | - | xargs -0 -r purs-tidy check |
132 | | - |
133 | | -format-js-staged: requires_nix_shell |
134 | | - @git diff -z --name-only --diff-filter=d --cached HEAD\ |
135 | | - | grep -Ez '^.*\.js$$'\ |
136 | | - | while IFS= read -r -d '' FILE; do test -f $$FILE && printf "$$FILE\0"; done\ |
137 | | - | xargs -0 -r eslint --fix |
138 | | - |
139 | | -check-format-js-staged: requires_nix_shell |
140 | | - @git diff -z --name-only --diff-filter=d --cached HEAD\ |
141 | | - | grep -Ez '^.*\.js$$'\ |
142 | | - | xargs -0 -r eslint |
143 | | - |
144 | | -format-dhall-staged: requires_nix_shell |
145 | | - @git diff -z --name-only --diff-filter=d --cached HEAD\ |
146 | | - | grep -Ez '^.*\.dhall$$'\ |
147 | | - | while IFS= read -r -d '' FILE; do test -f $$FILE && printf "$$FILE\0"; done\ |
148 | | - | xargs -0 -r dhall lint |
149 | | - |
150 | | -check-format-dhall-staged: requires_nix_shell |
151 | | - @git diff -z --name-only --diff-filter=d --cached HEAD\ |
152 | | - | grep -Ez '^.*\.dhall$$'\ |
153 | | - | xargs -0 -r dhall lint --check |
154 | | - |
155 | 115 | nixpkgsfmt: requires_nix_shell |
156 | 116 | nixpkgs-fmt $(NIX_SOURCES) |
157 | 117 |
|
|
0 commit comments