@@ -27,9 +27,11 @@ import (
2727func getDefaultExcludeHelp () string {
2828 parts := []string {"Use or not use default excludes:" }
2929 for _ , ep := range config .DefaultExcludePatterns {
30- parts = append (parts , fmt .Sprintf (" # %s: %s" , ep .Linter , ep .Why ))
31- parts = append (parts , fmt .Sprintf (" - %s" , color .YellowString (ep .Pattern )))
32- parts = append (parts , "" )
30+ parts = append (parts ,
31+ fmt .Sprintf (" # %s: %s" , ep .Linter , ep .Why ),
32+ fmt .Sprintf (" - %s" , color .YellowString (ep .Pattern )),
33+ "" ,
34+ )
3335 }
3436 return strings .Join (parts , "\n " )
3537}
@@ -184,7 +186,7 @@ func (e *Executor) initRunConfiguration(cmd *cobra.Command) {
184186 initFlagSet (fs , e .cfg , e .DBManager , true )
185187}
186188
187- func (e Executor ) getConfigForCommandLine () (* config.Config , error ) {
189+ func (e * Executor ) getConfigForCommandLine () (* config.Config , error ) {
188190 // We use another pflag.FlagSet here to not set `changed` flag
189191 // on cmd.Flags() options. Otherwise string slice options will be duplicated.
190192 fs := pflag .NewFlagSet ("config flag set" , pflag .ContinueOnError )
@@ -412,10 +414,10 @@ func (e *Executor) setupExitCode(ctx context.Context) {
412414 }
413415}
414416
415- func watchResources (ctx context.Context , done chan struct {}, log logutils.Log ) {
417+ func watchResources (ctx context.Context , done chan struct {}, logger logutils.Log ) {
416418 startedAt := time .Now ()
417419
418- rssValues := []uint64 {}
420+ var rssValues []uint64
419421 ticker := time .NewTicker (100 * time .Millisecond )
420422 defer ticker .Stop ()
421423
@@ -448,8 +450,8 @@ func watchResources(ctx context.Context, done chan struct{}, log logutils.Log) {
448450
449451 const MB = 1024 * 1024
450452 maxMB := float64 (max ) / MB
451- log .Infof ("Memory: %d samples, avg is %.1fMB, max is %.1fMB" ,
453+ logger .Infof ("Memory: %d samples, avg is %.1fMB, max is %.1fMB" ,
452454 len (rssValues ), float64 (avg )/ MB , maxMB )
453- log .Infof ("Execution took %s" , time .Since (startedAt ))
455+ logger .Infof ("Execution took %s" , time .Since (startedAt ))
454456 close (done )
455457}
0 commit comments