From f9bd23de4708089c394bf9f93e9015bf84814b7d Mon Sep 17 00:00:00 2001 From: Assaf Admi Date: Wed, 20 Mar 2024 19:51:42 +0200 Subject: [PATCH] Apply monitoringlinter Apply monitoringlinter, which is designed to enforce kubevirt/community#219 by ensuring that monitoring-related practices are implemented within the pkg/monitoring directory using operator-observability methods. Signed-off-by: assafad --- Makefile | 4 ++++ hack/run-unit-tests.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 185b6d58..bbabb632 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,10 @@ test: lint-metrics: ./hack/prom_metric_linter.sh --operator-name="kubevirt" --sub-operator-name="hpp" +lint-monitoring: + go install github.com/kubevirt/monitoring/monitoringlinter/cmd/monitoringlinter@e2be790 + monitoringlinter ./... + generate-doc: build-docgen _out/metricsdocs > docs/metrics.md diff --git a/hack/run-unit-tests.sh b/hack/run-unit-tests.sh index 3cda467a..57b52e53 100755 --- a/hack/run-unit-tests.sh +++ b/hack/run-unit-tests.sh @@ -20,6 +20,7 @@ source "${script_dir}"/common.sh go version # Validate make lint-metrics +make lint-monitoring make generate-doc git difftool -y --trust-exit-code --extcmd=./hack/diff-csv.sh