|
1 |
| -fix-whitespace: Fixes whitespace issues. [](https://travis-ci.org/agda/fix-whitespace) |
2 |
| ---------------------------------------------- |
| 1 | +fix-whitespace: Fixes whitespace issues |
| 2 | +======================================= |
| 3 | + |
| 4 | +[](http://hackage.haskell.org/package/fix-whitespace) |
| 5 | +[](https://matrix.hackage.haskell.org/package/fix-whitespace) |
| 6 | +[](https://stackage.org/nightly/package/fix-whitespace) |
| 7 | +[](https://www.stackage.org/package/fix-whitespace) |
| 8 | +[](https://github.com/agda/fix-whitespace/actions) |
| 9 | + |
| 10 | + |
| 11 | +This tool can keep your project and repository clean of trailing |
| 12 | +whitespace and missing terminal newline. |
3 | 13 |
|
4 | 14 | Usage: `fix-whitespace [-h|--help] [-v|--verbose] [--check] [--config CONFIG] [FILES]`
|
5 | 15 |
|
6 |
| -The program does the following |
| 16 | +The program does the following to files specified in `FILES` or in the |
| 17 | +configuration file `fix-whitespace.yaml` under the current directory |
| 18 | +(and its subdirectories): |
7 | 19 |
|
8 |
| -* Removes trailing whitespace. |
9 |
| -* Removes trailing lines containing nothing but whitespace. |
10 |
| -* Ensures that the file ends in a newline character. |
| 20 | + * Remove trailing whitespace. |
| 21 | + * Remove trailing lines containing nothing but whitespace. |
| 22 | + * Ensure that the file ends in a newline character. |
11 | 23 |
|
12 |
| -for files specified in `[FILES]` or |
| 24 | +Available options: |
13 | 25 |
|
14 |
| - fix-whitespace.yaml |
| 26 | +* `-h --help` |
15 | 27 |
|
16 |
| -under the current directory. |
| 28 | + Show this help information. |
17 | 29 |
|
18 |
| -Background: Agda was reported to fail to compile on Windows |
19 |
| -because a file did not end with a newline character (Agda |
20 |
| -uses `-Werror`). |
| 30 | +* `-v --verbose` |
21 | 31 |
|
22 |
| -Available options: |
| 32 | + Show files as they are being checked. |
| 33 | + |
| 34 | +* `--config=CONFIG` |
23 | 35 |
|
24 |
| -* `-h --help` Show this help information. |
| 36 | + Override the project configuration `fix-whitespace.yaml`. |
25 | 37 |
|
26 |
| -* `-v --verbose` Show files as they are being checked. |
| 38 | +* `--check` |
27 | 39 |
|
28 |
| -* `--config=CONFIG` Override the project configuration `fix-whitespace.yaml`. |
| 40 | + With `--check` the program does not change any files, |
| 41 | + it just checks if any files would have been changed. |
| 42 | + In this case it returns with a non-zero exit code. |
29 | 43 |
|
30 |
| -* `--check` With `--check` the program does not change any files, |
31 |
| - it just checks if any files would have been changed. |
32 |
| - In this case it returns with a non-zero exit code. |
| 44 | +For an example configuration file see [the one of Agda](https://github.com/agda/agda/blob/f9a181685397517b5d14943ca88a1c0acacc2075/fix-whitespace.yaml). |
0 commit comments