@@ -2,8 +2,8 @@ package processors
2
2
3
3
import "github.com/golangci/golangci-lint/pkg/config"
4
4
5
- var defaultLintersExclusions = map [string ][]config.ExcludeRule {
6
- config .DefaultExclusionComments : {
5
+ var linterExclusionPresets = map [string ][]config.ExcludeRule {
6
+ config .ExclusionPresetComments : {
7
7
{
8
8
// Annoying issue about not having a comment. The rare codebase has such comments.
9
9
// CheckPackageComment, CheckExportedFunctionDocs, CheckExportedTypeDocs, CheckExportedVarDocs
@@ -50,7 +50,7 @@ var defaultLintersExclusions = map[string][]config.ExcludeRule{
50
50
},
51
51
},
52
52
},
53
- config .DefaultExclusionStdErrorHandling : {
53
+ config .ExclusionPresetStdErrorHandling : {
54
54
{
55
55
// Almost all programs ignore errors on these functions and in most cases it's ok.
56
56
BaseRule : config.BaseRule {
@@ -61,7 +61,7 @@ var defaultLintersExclusions = map[string][]config.ExcludeRule{
61
61
},
62
62
},
63
63
},
64
- config .DefaultExclusionCommonFalsePositives : {
64
+ config .ExclusionPresetCommonFalsePositives : {
65
65
{
66
66
// Too many false-positives on 'unsafe' usage.
67
67
BaseRule : config.BaseRule {
@@ -87,7 +87,7 @@ var defaultLintersExclusions = map[string][]config.ExcludeRule{
87
87
},
88
88
},
89
89
},
90
- config .DefaultExclusionLegacy : {
90
+ config .ExclusionPresetLegacy : {
91
91
{
92
92
// Common false positives.
93
93
BaseRule : config.BaseRule {
@@ -125,11 +125,13 @@ var defaultLintersExclusions = map[string][]config.ExcludeRule{
125
125
},
126
126
}
127
127
128
- func getDefaultLintersExclusions (names []string ) []config.ExcludeRule {
128
+ func getLinterExclusionPresets (names []string ) []config.ExcludeRule {
129
129
var rules []config.ExcludeRule
130
130
131
131
for _ , name := range names {
132
- rules = append (rules , defaultLintersExclusions [name ]... )
132
+ if p , ok := linterExclusionPresets [name ]; ok {
133
+ rules = append (rules , p ... )
134
+ }
133
135
}
134
136
135
137
return rules
0 commit comments