aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2023-03-16 21:44:24 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-16 21:47:30 +0100
commit6d59ad3f02bc97c0b5040f59259fa8450702a2e2 (patch)
tree8e7f64817d67e0af4bfe0e1301e2bf7bcce24851 /Makefile
parenta3edb98b0151a1793d10b5f1a171338a5997f004 (diff)
downloadaerc-6d59ad3f02bc97c0b5040f59259fa8450702a2e2.tar.gz
ci: fix lint if notmuch is not installed
The linter goes completely crazy when notmuch is not installed and the notmuch build tag is enabled. With an otherwise successful lint, the following output is generated: worker/notmuch/lib/database.go:14:10: could not import github.com/zenhack/go.notmuch (-: # github.com/zenhack/go.notmuch ../../go/pkg/mod/github.com/brunnre8/go.notmuch@v0.0.0-20201126061756-caa2daf7093c/configList.go:9:11: fatal error: notmuch.h: No such file or directory 9 | // #include <notmuch.h> | ^~~~~~~~~~~ compilation terminated.) (typecheck) notmuch "github.com/zenhack/go.notmuch" ^ commands/eml.go:4:2: "bytes" imported and not used (typecheck) "bytes" ^ aerc.go:39:7: previous case (typecheck) case *widgets.AccountView: ^ exit status 1 make: *** [Makefile:73: lint] Error 1 Only include the notmuch build tag in the lint process if it is actually installed. Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1874e0ff..4fe6456c 100644
--- a/Makefile
+++ b/Makefile
@@ -73,7 +73,8 @@ lint: linters.so
@$(GO) run mvdan.cc/gofumpt@$(gofumpt_tag) -d . | grep ^ \
&& echo The above files need to be formatted, please run make fmt && exit 1 \
|| echo all files formatted.
- $(GO) run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 run
+ $(GO) run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 run \
+ $$(echo $(GOFLAGS) | sed s/-tags=/--build-tags=/)
.PHONY: vulncheck
vulncheck: