diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-02 15:44:29 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-02 15:27:58 +0000 |
| commit | e3fbc05e3dd590044ba36af944802bbf123555e3 (patch) | |
| tree | c3794825c5a9480fa17c523f645d86872c95bbeb | |
| parent | 5cdbe12ef7ec1ee2d99c5430924aab23c0fea503 (diff) | |
.golangci.yml: warn about unused nolint directives
| -rw-r--r-- | .golangci.yml | 6 |
1 files changed, 6 insertions, 0 deletions
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/.*) |
