@@ -231,6 +231,7 @@ maligned: Tool to detect Go structs that would take less memory if their fields
231231misspell: Finds commonly misspelled English words in comments [fast: true, auto-fix: true]
232232nakedret: Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
233233nestif: Reports deeply nested if statements [fast: true, auto-fix: false]
234+ nolintlint: Reports ill-formed or insufficient nolint directives [fast: true, auto-fix: false]
234235prealloc: Finds slice declarations that could potentially be preallocated [fast: true, auto-fix: false]
235236rowserrcheck: checks whether Err of rows is checked successfully [fast: true, auto-fix: false]
236237scopelint: Scopelint checks for unpinned variables in go programs [fast: true, auto-fix: false]
@@ -496,6 +497,7 @@ golangci-lint help linters
496497- [godot](https://github.com/tetafro/godot) - Check if comments end in a period
497498- [testpackage](https://github.com/maratori/testpackage) - linter that makes you use a separate _test package
498499- [nestif](https://github.com/nakabonne/nestif) - Reports deeply nested if statements
500+ - [nolintlint](https://github.com/golangci-lint/pkg/golinters/nolintlint) - Reports ill-formed or insufficient nolint directives
499501
500502## Configuration
501503
@@ -843,6 +845,17 @@ linters-settings:
843845 simple: true
844846 range-loops: true # Report preallocation suggestions on range loops, true by default
845847 for-loops: false # Report preallocation suggestions on for loops, false by default
848+ nolintlint:
849+ # Enable to ensure that nolint directives are all used. Default is true.
850+ allow-unused: false
851+ # Disable to ensure that nolint directives don't have a leading space. Default is true.
852+ allow-leading-space: true
853+ # Exclude following linters from requiring an explanation. Default is [].
854+ allow-no-explanation: []
855+ # Enable to require an explanation after each nolint directive. Default is false.
856+ require-explanation: true
857+ # Enable to require an explanation after each nolint directive. Default is false.
858+ require-specific: true
846859 rowserrcheck:
847860 packages:
848861 - github.com/jmoiron/sqlx
@@ -1032,6 +1045,11 @@ linters-settings:
10321045 suggest-new: true
10331046 misspell:
10341047 locale: US
1048+ nolintlint:
1049+ allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
1050+ allow-unused: false # report any unused nolint directives
1051+ require-explanation: false # don't require an explanation for nolint directives
1052+ require-specific: false # don't require nolint directives to be specific about which linter is being skipped
10351053
10361054linters:
10371055 # please, do not use `enable-all`: it's deprecated and will be removed soon.
@@ -1062,6 +1080,7 @@ linters:
10621080 - lll
10631081 - misspell
10641082 - nakedret
1083+ - nolintlint
10651084 - rowserrcheck
10661085 - scopelint
10671086 - staticcheck
@@ -1298,6 +1317,7 @@ Thanks to developers and authors of used linters:
12981317- [tetafro](https://github.com/tetafro)
12991318- [maratori](https://github.com/maratori)
13001319- [nakabonne](https://github.com/nakabonne)
1320+ - [golangci-lint](https://github.com/golangci-lint)
13011321
13021322## Changelog
13031323
0 commit comments