@@ -290,10 +290,10 @@ func GetRulesCommand(engineConfig *EngineConfig) *cobra.Command {
290290
291291 tab := tabwriter .NewWriter (os .Stdout , 1 , 2 , 2 , ' ' , 0 )
292292
293- fmt .Fprintln (tab , "Name\t Description\t Tags\t Validity Check" )
294- fmt .Fprintln (tab , "----\t ----\t ----\t ----" )
293+ fmt .Fprintln (tab , "Name\t Description\t Tags\t Validity Check" ) //nolint:errcheck
294+ fmt .Fprintln (tab , "----\t ----\t ----\t ----" ) //nolint:errcheck
295295 for _ , rule := range * rules {
296- fmt .Fprintf (
296+ fmt .Fprintf ( //nolint:errcheck
297297 tab ,
298298 "%s\t %s\t %s\t %s\n " ,
299299 rule .Rule .RuleID ,
@@ -352,7 +352,8 @@ func getStartAndEndLines(ctx context.Context, pluginName string, gitInfo *plugin
352352 var startLine , endLine int
353353 var err error
354354
355- if pluginName == "filesystem" {
355+ switch pluginName {
356+ case "filesystem" :
356357 totalLines , totalOK := ctx .Value (totalLinesKey ).(int )
357358 chunkLines , chunkOK := ctx .Value (linesInChunkKey ).(int )
358359
@@ -363,12 +364,12 @@ func getStartAndEndLines(ctx context.Context, pluginName string, gitInfo *plugin
363364
364365 startLine = value .StartLine + offset
365366 endLine = value .EndLine + offset
366- } else if pluginName == "git" {
367+ case "git" :
367368 startLine , endLine , err = plugins .GetGitStartAndEndLine (gitInfo , value .StartLine , value .EndLine )
368369 if err != nil {
369370 return 0 , 0 , err
370371 }
371- } else {
372+ default :
372373 startLine = value .StartLine
373374 endLine = value .EndLine
374375 }
0 commit comments