aerc/worker
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
..
handlers go.mod: change base git url 2021-11-05 10:21:45 +01:00
imap imap: fix flags update 2022-10-04 10:19:40 +02:00
lib lint: check for bad white space habits 2022-10-19 10:19:19 +02:00
maildir maildir: make checkmail update directory counts 2022-10-18 22:25:46 +02:00
mbox logging: substitute %w for %v 2022-10-02 18:56:26 +02:00
notmuch lint: check for bad white space habits 2022-10-19 10:19:19 +02:00
types lint: check for bad white space habits 2022-10-19 10:19:19 +02:00
handler_notmuch.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
worker.go aerc: use single event loop 2022-10-07 10:51:53 +02:00
worker_enabled.go mbox: implement an mbox backend worker 2022-07-14 23:14:45 +02:00