File tree Expand file tree Collapse file tree 2 files changed +183
-0
lines changed Expand file tree Collapse file tree 2 files changed +183
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Whitespace
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+ release :
9
+ types :
10
+ - created
11
+ jobs :
12
+ check :
13
+ runs-on : ubuntu-20.04
14
+
15
+ strategy :
16
+ matrix :
17
+ ghc-ver : ['9.2']
18
+ cabal-ver : [latest]
19
+ # stack-ver: [2.5.1]
20
+ fix-whitespace-ver : [0.0.7]
21
+
22
+ steps :
23
+ - uses : actions/checkout@v2
24
+ name : Checkout sources
25
+
26
+ - name : Create directory for binary
27
+ run : |
28
+ mkdir -p $HOME/.local/bin
29
+
30
+ - uses : actions/cache@v2
31
+ name : Cache the binary
32
+ id : cache
33
+ with :
34
+ path : " ~/.local/bin"
35
+ key : fix-whitespace-${{ matrix.fix-whitespace-ver }}
36
+
37
+ - uses : haskell/actions/setup@v1
38
+ if : ${{ !steps.cache.outputs.cache-hit }}
39
+ with :
40
+ ghc-version : ${{ matrix.ghc-ver }}
41
+ cabal-version : ${{ matrix.cabal-ver }}
42
+ # stack-version: ${{ matrix.stack-ver }}
43
+ # enable-stack: true
44
+
45
+ - name : Install fix-whitespace
46
+ if : ${{ !steps.cache.outputs.cache-hit }}
47
+ run : |
48
+ cabal install --install-method=copy --installdir=$HOME/.local/bin fix-whitespace
49
+ strip $HOME/.local/bin/fix-whitespace
50
+
51
+ - name : Check the whitespace issue
52
+ run : |
53
+ $HOME/.local/bin/fix-whitespace --check
Original file line number Diff line number Diff line change
1
+ # This file contains the project-specific settings for `fix-whitespace` a tiny
2
+ # but useful tool to
3
+ #
4
+ # * Removes trailing whitespace.
5
+ # * Removes trailing lines containing nothing but whitespace.
6
+ # * Ensures that the file ends in a newline character.
7
+ #
8
+ # By default, fix-whitespace checks every directory under the current working
9
+ # directory but no files. This program should be placed under a text-based
10
+ # project.
11
+ #
12
+ # For directories,
13
+ #
14
+ # 1) excluded-dirs is a black-list of directories,
15
+ # 2) included-dirs is a white-list of excluded-dirs
16
+ #
17
+ # For files,
18
+ #
19
+ # 3) included-files is a white-list of files,
20
+ # 4) excluded-files is a black-list of included-files.
21
+ #
22
+ # The extended glob pattern can be used to specify file/direcotory names.
23
+ # For details, see http://hackage.haskell.org/package/filemanip-0.3.6.3/docs/System-FilePath-GlobPattern.html
24
+ #
25
+ included-dirs :
26
+ # Without this line the above path will be excluded.
27
+
28
+ excluded-dirs :
29
+ - " **/dist*" # matches every dist* in any directory
30
+ - _darcs
31
+ - .git
32
+ - .python-sphinx-virtualenv
33
+ - .stack-work
34
+ - .vscode
35
+
36
+ # Every matched filename is included unless it is matched by excluded-files.
37
+ included-files :
38
+ - .dockerignore
39
+ - .gitignore
40
+ - .gitattributes
41
+ - AUTHORS
42
+ - LICENSE
43
+ - " cabal.project.*"
44
+ - " *.ac"
45
+ - " *.bat"
46
+ - " *.bat_t"
47
+ - " *.c"
48
+ - " *.cabal"
49
+ - " *.cmm"
50
+ - " *.cobol"
51
+ - " *.conf"
52
+ - " *.config"
53
+ - " *.cfg"
54
+ - " *.cpp"
55
+ - " *.csh"
56
+ - " *.css"
57
+ - " *.css_t"
58
+ - " *.dhall"
59
+ - " *.dockerfile"
60
+ - " *.el"
61
+ - " *.h"
62
+ - " *.hs"
63
+ - " *.hs-boot"
64
+ - " *.hsc"
65
+ - " *.hsig"
66
+ - " *.html"
67
+ - " *.html_t"
68
+ - " *.in"
69
+ - " *.inc"
70
+ - " *.js"
71
+ - " *.js_t"
72
+ - " *.json"
73
+ - " *.lhs"
74
+ - " *.md"
75
+ - " *.py"
76
+ - " *.rst"
77
+ - " *.rst_t"
78
+ - " *.sh"
79
+ - " *.sty"
80
+ - " *.tex"
81
+ - " *.tex_t"
82
+ - " *.toml"
83
+ - " *.txt"
84
+ - " *.x"
85
+ - " *.y"
86
+ - " *.yaml"
87
+ - " *.yml"
88
+ - " *.zinza"
89
+
90
+ excluded-files :
91
+ # Exceptions
92
+ - Cabal-syntax/src/Distribution/Fields/Lexer.hs
93
+ - Cabal-tests/tests/ParserTests/warnings/tab.cabal
94
+ - Cabal-tests/tests/ParserTests/warnings/utf8.cabal
95
+
96
+ # Files that use tabs
97
+ - Makefile
98
+ - GNUmakefile
99
+ - " *.mk"
100
+ - .mailmap
101
+
102
+ # Generated files
103
+ - TAGS
104
+ - " *.buildinfo"
105
+ - " *.check"
106
+ - " *.expr"
107
+ - " *.errors"
108
+ - " *.format"
109
+ - " *.freeze"
110
+ - " *.golden"
111
+ - " *.log"
112
+ - " *.out"
113
+
114
+ # Binary files
115
+ - " *.a"
116
+ - " *.dylib"
117
+ - " *.dyn_hi"
118
+ - " *.dyn_hi-boot"
119
+ - " *.enc"
120
+ - " *.exe"
121
+ - " *.gif"
122
+ - " *.gz"
123
+ - " *.hi"
124
+ - " *.hi-boot"
125
+ - " *.o"
126
+ - " *.o-boot"
127
+ - " *.p_hi"
128
+ - " *.p_o"
129
+ - " *.png"
130
+ - " *.so"
You can’t perform that action at this time.
0 commit comments