lintcmd: move code closer to first use
@@ -212,9 +212,6 @@ func (cmd *Command) Run() {
}
}
- cfg := config.Config{}
- cfg.Checks = cmd.flags.checks
-
exit := func(code int) {
if cmd.flags.debugCpuprofile != "" {
pprof.StopCPUProfile()
@@ -321,7 +318,9 @@ func (cmd *Command) Run() {
Tags: cmd.flags.tags,
LintTests: cmd.flags.tests,
GoVersion: string(cmd.flags.goVersion),
- Config: cfg,
+ Config: config.Config{
+ Checks: cmd.flags.checks,
+ },
PrintAnalyzerMeasurement: measureAnalyzers,
})
if err != nil {
