File tree 3 files changed +25
-4
lines changed 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
jobs :
9
9
whitespace :
10
+ defaults :
11
+ run :
12
+ shell : bash
10
13
runs-on : ubuntu-latest
11
14
12
15
steps :
16
+
13
17
- uses : actions/checkout@v4
14
- - uses : andreasabel/fix-whitespace-action@v1
15
- with :
16
- verbose : true
18
+
19
+ - run : |
20
+ # no longer using the action because apparently we're supposed to use the Makefile here
21
+ wget -q https://github.com/agda/fix-whitespace/releases/download/v0.1/fix-whitespace-0.1-linux.binary
22
+ mkdir -p "$HOME/.local/bin"
23
+ mv fix-whitespace-0.1-linux.binary "$HOME/.local/bin/fix-whitespace"
24
+ chmod +x "$HOME/.local/bin/fix-whitespace"
25
+ echo "$HOME/.local/bin" >> $GITHUB_PATH
26
+
27
+ - run : make whitespace
Original file line number Diff line number Diff line change @@ -191,7 +191,9 @@ Whitespace Conventions
191
191
192
192
We use automated whitespace convention checking. Violations can be fixed by
193
193
running [ fix-whitespace] ( https://hackage.haskell.org/package/fix-whitespace ) . If
194
- you push a fix of a whitespace violation, please do so in a _ separate commit_ .
194
+ you push a fix of a whitespace violation, please do so in a _ separate commit_ . For convenience,
195
+ ` make whitespace ` will show violations and ` make fix-whitespace ` will fix them, if the
196
+ ` fix-whitespace ` utility is installed.
195
197
196
198
Other Conventions
197
199
-----------------
Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ style-commit: ## Run the code styler on the previous commit
41
41
@git diff --name-only HEAD $(COMMIT ) Cabal Cabal-syntax cabal-install \
42
42
| grep ' .hs$$' | xargs -P $(PROCS ) -I {} fourmolu -q -i {}
43
43
44
+ .PHONY : whitespace
45
+ whitespace : # # Run fix-whitespace in check mode
46
+ fix-whitespace --check --verbose
47
+
48
+ .PHONY : fix-whitespace
49
+ fix-whitespace : # # Run fix-whitespace in fix mode
50
+ fix-whitespace --verbose
51
+
44
52
# source generation: SPDX
45
53
46
54
SPDX_LICENSE_HS: =Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
You can’t perform that action at this time.
0 commit comments