File tree 4 files changed +2
-20
lines changed
4 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -1847,11 +1847,6 @@ linters-settings:
1847
1847
# Default: true
1848
1848
strict-append : true
1849
1849
1850
- contextcheck :
1851
- # If you use contextcheck in docker ci, and feel a little bit slow, you can turn on this option.
1852
- # Default: false
1853
- disable-fact : true
1854
-
1855
1850
# The custom section can be used to define linter plugins to be loaded at runtime.
1856
1851
# See README documentation for more info.
1857
1852
custom :
@@ -1970,7 +1965,6 @@ linters:
1970
1965
- whitespace
1971
1966
- wrapcheck
1972
1967
- wsl
1973
- - contextcheck
1974
1968
1975
1969
# Enable all available linters.
1976
1970
# Default: false
@@ -2073,7 +2067,6 @@ linters:
2073
2067
- whitespace
2074
2068
- wrapcheck
2075
2069
- wsl
2076
- - contextcheck
2077
2070
2078
2071
# Enable presets.
2079
2072
# https://golangci-lint.run/usage/linters
Original file line number Diff line number Diff line change @@ -184,7 +184,6 @@ type LintersSettings struct {
184
184
Whitespace WhitespaceSettings
185
185
Wrapcheck WrapcheckSettings
186
186
WSL WSLSettings
187
- ContextCheck ContextCheckSettings
188
187
189
188
Custom map [string ]CustomLinterSettings
190
189
}
@@ -657,10 +656,6 @@ type WSLSettings struct {
657
656
ForceCaseTrailingWhitespaceLimit int `mapstructure:"force-case-trailing-whitespace"`
658
657
}
659
658
660
- type ContextCheckSettings struct {
661
- DisableFact bool `mapstructure:"disable-fact"`
662
- }
663
-
664
659
// CustomLinterSettings encapsulates the meta-data of a private linter.
665
660
// For example, a private linter may be added to the golangci config file as shown below.
666
661
//
Original file line number Diff line number Diff line change @@ -4,16 +4,12 @@ import (
4
4
"github.com/sylvia7788/contextcheck"
5
5
"golang.org/x/tools/go/analysis"
6
6
7
- "github.com/golangci/golangci-lint/pkg/config"
8
7
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
9
8
"github.com/golangci/golangci-lint/pkg/lint/linter"
10
9
)
11
10
12
- func NewContextCheck (settings * config. ContextCheckSettings ) * goanalysis.Linter {
11
+ func NewContextCheck () * goanalysis.Linter {
13
12
conf := contextcheck.Configuration {}
14
- if settings != nil {
15
- conf .DisableFact = settings .DisableFact
16
- }
17
13
analyzer := contextcheck .NewAnalyzer (conf )
18
14
return goanalysis .NewLinter (
19
15
"contextcheck" ,
Original file line number Diff line number Diff line change @@ -170,7 +170,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
170
170
whitespaceCfg * config.WhitespaceSettings
171
171
wrapcheckCfg * config.WrapcheckSettings
172
172
wslCfg * config.WSLSettings
173
- contextcheckCfg * config.ContextCheckSettings
174
173
)
175
174
176
175
if m .cfg != nil {
@@ -242,7 +241,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
242
241
whitespaceCfg = & m .cfg .LintersSettings .Whitespace
243
242
wrapcheckCfg = & m .cfg .LintersSettings .Wrapcheck
244
243
wslCfg = & m .cfg .LintersSettings .WSL
245
- contextcheckCfg = & m .cfg .LintersSettings .ContextCheck
246
244
247
245
if govetCfg != nil {
248
246
govetCfg .Go = m .cfg .Run .Go
@@ -298,7 +296,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
298
296
WithPresets (linter .PresetStyle ).
299
297
WithURL ("https://github.com/sivchari/containedctx" ),
300
298
301
- linter .NewConfig (golinters .NewContextCheck (contextcheckCfg )).
299
+ linter .NewConfig (golinters .NewContextCheck ()).
302
300
WithSince ("v1.43.0" ).
303
301
WithPresets (linter .PresetBugs ).
304
302
WithLoadForGoAnalysis ().
You can’t perform that action at this time.
0 commit comments