From 611ff00035489cf6f51a71fb29f3b11f76113376 Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Sat, 19 Oct 2024 12:09:08 +0200 Subject: [PATCH] Add go vet and staticcheck as local targets --- Taskfile.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Taskfile.yaml b/Taskfile.yaml index 1569232ea..c5d65f3b1 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -17,6 +17,13 @@ tasks: cmds: - task: balancer:ui:build + lint: + aliases: [l] + cmds: + - task: cleaner:lint + - task: balancer:api:lint + - task: progress-watchdog:lint + test: aliases: [t] cmds: @@ -50,6 +57,15 @@ tasks: - go test ./... dir: balancer/ + balancer:api:lint: + preconditions: + - sh: which staticcheck + msg: "staticcheck needs to be installed for running the balancer api linter." + cmds: + - go vet ./... + - staticcheck ./... + dir: balancer/ + progress-watchdog:test: preconditions: - sh: which go @@ -58,11 +74,29 @@ tasks: - go test ./... dir: progress-watchdog/ + progress-watchdog:lint: + preconditions: + - sh: which staticcheck + msg: "staticcheck needs to be installed for running the progress-watchdog linter." + cmds: + - go vet ./... + - staticcheck ./... + dir: progress-watchdog/ + cleaner:test: cmds: - go test ./... dir: cleaner/ + cleaner:lint: + preconditions: + - sh: which staticcheck + msg: "staticcheck needs to be installed for running the cleaner linter." + cmds: + - go vet ./... + - staticcheck ./... + dir: cleaner/ + helm:test: preconditions: - sh: helm version