Skip to content

Commit c21dbcd

Browse files
committed
Re #8320: explain fix-whitespace in CONTRIBUTING guide
1 parent 4eaf711 commit c21dbcd

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

CONTRIBUTING.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,34 @@ names. When running `cabal-install` test suites, one need only use `cabal test`
113113
`cabal run <test-target>` in order to test locally.
114114

115115

116-
Conventions
117-
-----------
116+
Whitespace Conventions
117+
----------------------
118118

119-
* Spaces, not tabs.
119+
* No tab characters allowed.
120+
* No trailing whitespace allowed.
121+
* File needs to be terminated by a newline character.
122+
123+
These conventions are enforced by the
124+
[fix-whitespace](https://hackage.haskell.org/package/fix-whitespace)
125+
tool. Install it from hackage as usual (`cabal install fix-whitespace`)
126+
and run it in the project root to fix whitespace violations.
127+
128+
The files included in the automatic whitespace check are specified in
129+
`fix-whitespace.yaml`. Please add to this file if you add textfiles
130+
to this repository that are not included by the rules given there.
131+
Note that files that make essential use of tab characters (like `Makefile`)
132+
should _not_ be included in the automatic check.
133+
134+
Whitespace conventions are enforced by
135+
[CI](https://github.com/haskell/cabal/actions/workflows/whitespace.yml).
136+
If you push a fix of a whitespace violation, please do so in a
137+
_separate commit_.
138+
139+
140+
141+
142+
Other Conventions
143+
-----------------
120144

121145
* Try to follow style conventions of a file you are modifying, and
122146
avoid gratuitous reformatting (it makes merges harder!)

0 commit comments

Comments
 (0)