From e3fbc05e3dd590044ba36af944802bbf123555e3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 2 Jan 2026 15:44:29 +0100 Subject: .golangci.yml: warn about unused nolint directives --- .golangci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 1b95a5a99..af8606be9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -37,6 +37,7 @@ linters: - lll - misspell - nestif + - nolintlint - recvcheck - revive - staticcheck @@ -97,6 +98,9 @@ linters: nestif: # TODO: consider reducing this value. min-complexity: 12 + nolintlint: + allow-unused: false + require-specific: true revive: rules: - name: package-comments @@ -115,6 +119,8 @@ linters: exclusions: warn-unused: true # Log a warning if an exclusion path is unused. rules: + - path: (.*\.go) + text: "directive `// nolint:.*` should be written without leading space" - path: (sys/.*/init.*|sys/targets/common.go) text: "don't use ALL_CAPS in Go names|should not use ALL_CAPS in Go names" - path: (prog/.*) -- cgit mrf-deployment