diff options
author | Robin Jarry <robin@jarry.cc> | 2023-12-05 20:46:55 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-12-14 23:05:07 +0100 |
commit | 73bf7241e611ea28e7a58584341921d1262afaa1 (patch) | |
tree | de7a87d1c8888d6e4309f5cf06f1a82f9e8ec051 /GNUmakefile | |
parent | 2db657b6bdd6394109c8adc32098d3f39c43f03d (diff) | |
download | aerc-73bf7241e611ea28e7a58584341921d1262afaa1.tar.gz |
lint,validate: fix for openbsd
- Remove GNU specific stuff (ln -v, mktemp --tempdir, grep --color)
- Remove GCC specific flags in sendemail-validate (-Warith-conversion)
- Add -std=c99 and -Wpedantic and fix the reported warnings.
- Explicitly call gmake everywhere.
- Run our custom analyzer standalone. Golangci lint plugins are not
supported on OpenBSD. Indirect dependency to golang.org/x/mod is
required somehow...
Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile index 53b55f8c..cd86c096 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -46,11 +46,8 @@ dev: fmt: $(GO) run mvdan.cc/gofumpt@$(gofumpt_tag) -w . -linters.so: contrib/linters.go - $(GO) build -buildmode=plugin -o linters.so contrib/linters.go - .PHONY: lint -lint: linters.so +lint: @contrib/check-whitespace `git ls-files ':!:filters/vectors'` && \ echo white space ok. @contrib/check-docs && echo docs ok. @@ -59,6 +56,7 @@ lint: linters.so || echo all files formatted. $(GO) run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 run \ $$(echo $(GOFLAGS) | sed s/-tags=/--build-tags=/) + $(GO) run $(GOFLAGS) contrib/linters.go ./... .PHONY: vulncheck vulncheck: @@ -118,7 +116,8 @@ gitconfig: @mkdir -p .git/hooks @rm -f .git/hooks/sendemail-validate* @if grep -q GIT_SENDEMAIL_FILE_COUNTER `git --exec-path`/git-send-email 2>/dev/null; then \ - ln -svf ../../contrib/sendemail-validate .git/hooks/sendemail-validate && \ + set -xe; \ + ln -s ../../contrib/sendemail-validate .git/hooks/sendemail-validate && \ git config sendemail.validate true; \ fi |