Skip to content

Commit 52dc14a

Browse files
9999yearsphilderbeast
authored andcommitted
Revert format-more except Makefile
1 parent 529bd1f commit 52dc14a

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

Makefile

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,40 @@ init: ## Set up git hooks and ignored revisions.
2727
@git config core.hooksPath .githooks
2828
## TODO
2929

30+
# NOTE: Keep this in sync with `.github/workflows/format.yml`.
31+
FORMAT_DIRS := \
32+
bootstrap \
33+
buildinfo-reference-generator \
34+
Cabal \
35+
Cabal-benchmarks \
36+
Cabal-described \
37+
Cabal-dev-scripts \
38+
Cabal-hooks \
39+
cabal-install \
40+
cabal-install-solver \
41+
Cabal-QuickCheck \
42+
Cabal-syntax \
43+
Cabal-tests \
44+
Cabal-testsuite/src \
45+
Cabal-testsuite/main \
46+
Cabal-testsuite/static \
47+
Cabal-tree-diff \
48+
cabal-validate \
49+
solver-benchmarks
50+
51+
3052
.PHONY: style
31-
style: ## Run the code styler.
32-
@fourmolu -q -i Cabal Cabal-syntax cabal-install cabal-validate
53+
style: ## Run the code styler
54+
@fourmolu -q -i $(FORMAT_DIRS)
3355

3456
.PHONY: style-modified
35-
style-modified: ## Run the code styler on modified files.
36-
@git ls-files --modified Cabal Cabal-syntax cabal-install cabal-validate \
57+
style-modified: ## Run the code styler on modified files
58+
@git ls-files --modified $(FORMAT_DIRS) \
3759
| grep '.hs$$' | xargs -P $(PROCS) -I {} fourmolu -q -i {}
3860

3961
.PHONY: style-commit
40-
style-commit: ## Run the code styler on the previous commit.
41-
@git diff --name-only HEAD $(COMMIT) Cabal Cabal-syntax cabal-install cabal-validate \
62+
style-commit: ## Run the code styler on the previous commit
63+
@git diff --name-only HEAD $(COMMIT) -- $(FORMAT_DIRS) \
4264
| grep '.hs$$' | xargs -P $(PROCS) -I {} fourmolu -q -i {}
4365

4466
.PHONY: whitespace

0 commit comments

Comments
 (0)