From 8830c0bc9d888e1680715e526cecbb89ab25ff9b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Tue, 9 Jun 2026 10:47:19 +0200 Subject: [PATCH] Add github actions linting Signed-off-by: Jean-Philippe Evrard --- .config/mise.toml | 1 + Makefile | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.config/mise.toml b/.config/mise.toml index d4b77b5..797a118 100644 --- a/.config/mise.toml +++ b/.config/mise.toml @@ -1,4 +1,5 @@ [tools] +actionlint = "latest" cosign = "3.0.6" go = "1.26.4" golangci-lint = "2.12.2" diff --git a/Makefile b/Makefile index 14a8ad3..c12aba5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT: all -.PHONY: all clean install-tools dev-image release dev-manifest e2e-test minikube-publish test lint lint-docs +.PHONY: all clean install-tools dev-image release dev-manifest e2e-test minikube-publish test lint lint-go lint-sh lint-ghactions lint-docs DH_ORG ?= kubereboot IMAGE_NAME ?= $(DH_ORG)/kured @@ -52,9 +52,17 @@ test: lint @echo "Running short go tests" go test -test.short -json ./... > test.json -lint: +lint: lint-sh lint-ghactions lint-go + +lint-sh: @echo "Running shellcheck" find . -name '*.sh' | xargs -n1 shellcheck + +lint-ghactions: + @echo "Running actionlint" + actionlint -verbose + +lint-go: @echo "Running golangci-lint..." golangci-lint run --config $(GOLANGCI_CONFIG) ./...