From 52e8043921ae31d31e40665902600f97a9f60d9f Mon Sep 17 00:00:00 2001 From: feistel <6742251-feistel@users.noreply.gitlab.com> Date: Mon, 2 May 2022 17:27:44 +0200 Subject: Add nolintlint linter configuration Require an explanation for nolint rules and warn about unused rules --- .golangci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.golangci.yml') diff --git a/.golangci.yml b/.golangci.yml index 3b472def..795ee62b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -37,6 +37,16 @@ linters-settings: min-occurrences: 3 goimports: local-prefixes: gitlab.com/gitlab-org/gitlab-pages + nolintlint: + # Disable to ensure that all nolint directives actually have an effect. + # Default: false + allow-unused: false + # Enable to require an explanation of nonzero length after each nolint directive. + # Default: false + require-explanation: true + # Enable to require nolint directives to mention the specific linter being suppressed. + # Default: false + require-specific: true staticcheck: # Select the Go version to target. # Default: 1.13 -- cgit v1.2.3