File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,14 @@ import (
9
9
)
10
10
11
11
func NewContextCheck () * goanalysis.Linter {
12
- conf := contextcheck.Configuration {}
13
- analyzer := contextcheck . NewAnalyzer ( conf )
12
+ analyzer := contextcheck .NewAnalyzer (contextcheck. Configuration {})
13
+
14
14
return goanalysis .NewLinter (
15
- "contextcheck" ,
16
- "check the function whether use a non-inherited context" ,
15
+ analyzer . Name ,
16
+ analyzer . Doc ,
17
17
[]* analysis.Analyzer {analyzer },
18
18
nil ,
19
- ).WithLoadMode (goanalysis .LoadModeTypesInfo ).
20
- WithContextSetter (func (lintCtx * linter.Context ) {
21
- analyzer .Run = contextcheck .NewRun (lintCtx .Packages , conf .DisableFact )
22
- })
19
+ ).WithContextSetter (func (lintCtx * linter.Context ) {
20
+ analyzer .Run = contextcheck .NewRun (lintCtx .Packages , false )
21
+ }).WithLoadMode (goanalysis .LoadModeTypesInfo )
23
22
}
You can’t perform that action at this time.
0 commit comments