You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [godot](https://github.com/tetafro/godot) - Check if comments end in a period
497
498
- [testpackage](https://github.com/maratori/testpackage) - linter that makes you use a separate _test package
498
499
- [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
499
501
500
502
## Configuration
501
503
@@ -544,7 +546,7 @@ Flags:
544
546
--disable-all Disable all linters
545
547
-p, --presets strings Enable presets (bugs|complexity|format|performance|style|unused) of linters. Run 'golangci-lint linters' to see them. This option implies option --disable-all
546
548
--fast Run only fast linters from enabled linters set (first run won't be fast)
547
-
-e, --exclude strings Exclude issue by regexp
549
+
-e, --exclude strings ExcludeLinters issue by regexp
548
550
--exclude-use-default Use or not use default excludes:
549
551
# EXC0001 errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
550
552
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
@@ -843,6 +845,17 @@ linters-settings:
843
845
simple: true
844
846
range-loops: true # Report preallocation suggestions on range loops, true by default
845
847
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
846
859
rowserrcheck:
847
860
packages:
848
861
- github.com/jmoiron/sqlx
@@ -1032,6 +1045,11 @@ linters-settings:
1032
1045
suggest-new: true
1033
1046
misspell:
1034
1047
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
1035
1053
1036
1054
linters:
1037
1055
# please, do not use `enable-all`: it's deprecated and will be removed soon.
@@ -1062,6 +1080,7 @@ linters:
1062
1080
- lll
1063
1081
- misspell
1064
1082
- nakedret
1083
+
- nolintlint
1065
1084
- rowserrcheck
1066
1085
- scopelint
1067
1086
- staticcheck
@@ -1298,6 +1317,7 @@ Thanks to developers and authors of used linters:
0 commit comments