aerc/doc
Robin Jarry ebcd6fcea1 lint: check for bad white space habits
A little coding hygiene cannot hurt. Add a simple awk script to check
all source files for bad white space habits:

- trailing white space
- trailing new lines at the end of files
- missing new line at the end of files
- spaces followed by tabs

The script outputs color when the terminal supports it. It exits with
a non-zero code when there was at least one white space issue found.
Call the script in the lint step.

Example output of the awk script:

 config/default_styleset:1:# <-- trailing whitespace
 config/default_styleset:3:# <-- trailing whitespace
 doc/aerc.1.scd:78:        Executes an arbitrary command in the background. Aerc will set the <-- trailing whitespace
 doc/aerc.1.scd:234:        <-- trailing whitespace
 doc/aerc.1.scd:237:        <-- trailing whitespace
 worker/types/thread_test.go:74:        //         return ErrSkipThread<-- space(s) followed by tab(s)
 worker/lib/testdata/message/invalid/hexa: trailing new line(s)

Fix issues reported by the script.

NB: The ENDFILE match is a GNU extension. It will be ignored on BSD-awk
and trailing new lines will not be detected. The lint make target is
only invoked on alpine linux which has GNU awk anyway.

NB: Empty cells in scdoc tables require trailing white space... Avoid
this by setting content in these cells. I don't really see a use for
empty cells.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
2022-10-19 10:19:19 +02:00
..
aerc-config.5.scd lint: check for bad white space habits 2022-10-19 10:19:19 +02:00
aerc-imap.5.scd imap,smtp: add XOAUTH2 support 2022-10-01 15:47:33 +02:00
aerc-maildir.5.scd worker/maildir: implement Maildir++ support 2022-07-10 20:34:47 +02:00
aerc-notmuch.5.scd doc: fix man page typos 2022-08-22 09:49:26 +02:00
aerc-search.1.scd doc: fix typos 2022-07-18 13:58:27 +02:00
aerc-sendmail.5.scd doc: correct typo in man-pages 2022-01-26 19:23:29 +01:00
aerc-smtp.5.scd imap,smtp: add XOAUTH2 support 2022-10-01 15:47:33 +02:00
aerc-stylesets.7.scd lint: check for bad white space habits 2022-10-19 10:19:19 +02:00
aerc-templates.7.scd compose: allow setting all headers in templates 2022-02-03 09:55:20 +01:00
aerc-tutorial.7.scd doc: correct typo in man-pages 2022-01-26 19:23:29 +01:00
aerc.1.scd lint: check for bad white space habits 2022-10-19 10:19:19 +02:00