Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Jan 14, 2025
1 parent 6da25ad commit 205767c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions internal/doculint/doculint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/header/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 205767c

Please sign in to comment.