From 68f5621f30f75b910b6dd965beb4ffe9ac329259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 18 Jan 2021 21:15:05 +0100 Subject: [PATCH 1/2] Makefile: make "lint-strict" a proper target Refactor the pseudo-target I added in 688682aa0 (Lint: add a "lint-strict" CI target, 2021-01-06) so you can run this with "make lint-strict". --- .gitlab-ci.yml | 3 +-- Makefile | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6dd413357d0..c5c358c9fbf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -308,8 +308,7 @@ lint-strict: retry: 2 script: - go version - # b7e24f70b (Add graph from graffle, 2016-11-14) is the root commit - - GOLANGCI_LINT_OPTIONS="--new-from-rev='b7e24f70b71ae8aeb0b6a0d91bf49960e17cb3a3'" make lint + - make lint-strict objectinfo_fuzz_test: extends: .fuzz_base diff --git a/Makefile b/Makefile index 930fbe916d5..ca839bf9375 100644 --- a/Makefile +++ b/Makefile @@ -264,6 +264,11 @@ check-mod-tidy: lint: ${GOLANGCI_LINT} libgit2 ${Q}${GOLANGCI_LINT} cache clean && ${GOLANGCI_LINT} run --build-tags "${GO_BUILD_TAGS}" --out-format tab --config ${SOURCE_DIR}/.golangci.yml ${GOLANGCI_LINT_OPTIONS} +.PHONY: lint-strict +lint-strict: + # b7e24f70b (Add graph from graffle, 2016-11-14) is the root commit + ${Q}GOLANGCI_LINT_OPTIONS="--new-from-rev='b7e24f70b71ae8aeb0b6a0d91bf49960e17cb3a3'" $(MAKE) lint + .PHONY: check-formatting check-formatting: ${GOIMPORTS} ${GITALYFMT} ${Q}${GOIMPORTS} -l $(call find_go_sources) | awk '{ print } END { if(NR>0) { print "goimports error, run make format"; exit(1) } }' -- GitLab From 261db420fc3d289d9ba9c9c791e7699bb7d97cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 18 Jan 2021 21:07:37 +0100 Subject: [PATCH 2/2] Lint: move "lint-strict" target to nightly schedule Since my 688682aa0 (Lint: add a "lint-strict" CI target, 2021-01-06) we've been showing the (!) checkmark next to all MRs instead of the green/red OK/fail checkmark. Since these strict lint failures are just something we want to keep an eye on and not really actionable for any one MR author let's move them to the nightly run accessible at https://gitlab.com/gitlab-org/gitaly/-/pipeline_schedules --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5c358c9fbf..ca7d177314f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -309,6 +309,8 @@ lint-strict: script: - go version - make lint-strict + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule"' objectinfo_fuzz_test: extends: .fuzz_base -- GitLab