diff --git a/internal/doculint/doculint.go b/internal/doculint/doculint.go index 1a8ce21..b4094bb 100644 --- a/internal/doculint/doculint.go +++ b/internal/doculint/doculint.go @@ -122,9 +122,6 @@ func doculint(_pass *analysis.Pass) (interface{}, error) { //nolint:funlen // Wh allGenerated := true for _, file := range pass.Files { - // Pull file into a local variable so it can be passed as a parameter safely. - file := file - // Ignore generated files and test files. if common.IsGenerated(file) || common.IsTestFile(pass.Pass, file) { continue diff --git a/internal/header/header.go b/internal/header/header.go index b61debc..1911033 100644 --- a/internal/header/header.go +++ b/internal/header/header.go @@ -140,7 +140,7 @@ func header(pass *analysis.Pass) (interface{}, error) { //nolint:funlen // Why: prefix := fmt.Sprintf("%s: ", fields[i]) if strings.HasPrefix(cleanComment, prefix) { - if len(strings.TrimPrefix(cleanComment, prefix)) > 0 { + if strings.TrimPrefix(cleanComment, prefix) != "" { // If the current comment line has a field prefix we're looking for and // data proceeding the colon and space after the colon, we will mark the // field as valid.