File tree Expand file tree Collapse file tree 4 files changed +2
-20
lines changed Expand file tree Collapse file tree 4 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -1854,11 +1854,6 @@ linters-settings:
1854
1854
# Default: true
1855
1855
strict-append : true
1856
1856
1857
- contextcheck :
1858
- # If you use contextcheck in docker ci, and feel a little bit slow, you can turn on this option.
1859
- # Default: false
1860
- disable-fact : true
1861
-
1862
1857
# The custom section can be used to define linter plugins to be loaded at runtime.
1863
1858
# See README documentation for more info.
1864
1859
custom :
@@ -1979,7 +1974,6 @@ linters:
1979
1974
- whitespace
1980
1975
- wrapcheck
1981
1976
- wsl
1982
- - contextcheck
1983
1977
1984
1978
# Enable all available linters.
1985
1979
# Default: false
@@ -2084,7 +2078,6 @@ linters:
2084
2078
- whitespace
2085
2079
- wrapcheck
2086
2080
- wsl
2087
- - contextcheck
2088
2081
2089
2082
# Enable presets.
2090
2083
# https://golangci-lint.run/usage/linters
Original file line number Diff line number Diff line change @@ -185,7 +185,6 @@ type LintersSettings struct {
185
185
Whitespace WhitespaceSettings
186
186
Wrapcheck WrapcheckSettings
187
187
WSL WSLSettings
188
- ContextCheck ContextCheckSettings
189
188
190
189
Custom map [string ]CustomLinterSettings
191
190
}
@@ -662,10 +661,6 @@ type WSLSettings struct {
662
661
ForceCaseTrailingWhitespaceLimit int `mapstructure:"force-case-trailing-whitespace"`
663
662
}
664
663
665
- type ContextCheckSettings struct {
666
- DisableFact bool `mapstructure:"disable-fact"`
667
- }
668
-
669
664
// CustomLinterSettings encapsulates the meta-data of a private linter.
670
665
// For example, a private linter may be added to the golangci config file as shown below.
671
666
//
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 @@ -171,7 +171,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
171
171
whitespaceCfg * config.WhitespaceSettings
172
172
wrapcheckCfg * config.WrapcheckSettings
173
173
wslCfg * config.WSLSettings
174
- contextcheckCfg * config.ContextCheckSettings
175
174
)
176
175
177
176
if m .cfg != nil {
@@ -244,7 +243,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
244
243
whitespaceCfg = & m .cfg .LintersSettings .Whitespace
245
244
wrapcheckCfg = & m .cfg .LintersSettings .Wrapcheck
246
245
wslCfg = & m .cfg .LintersSettings .WSL
247
- contextcheckCfg = & m .cfg .LintersSettings .ContextCheck
248
246
249
247
if govetCfg != nil {
250
248
govetCfg .Go = m .cfg .Run .Go
@@ -300,7 +298,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
300
298
WithPresets (linter .PresetStyle ).
301
299
WithURL ("https://github.com/sivchari/containedctx" ),
302
300
303
- linter .NewConfig (golinters .NewContextCheck (contextcheckCfg )).
301
+ linter .NewConfig (golinters .NewContextCheck ()).
304
302
WithSince ("v1.43.0" ).
305
303
WithPresets (linter .PresetBugs ).
306
304
WithLoadForGoAnalysis ().
You can’t perform that action at this time.
0 commit comments