Skip to content

Commit

Permalink
report filename of skipped glob expression
Browse files Browse the repository at this point in the history
  • Loading branch information
pcj committed Nov 27, 2023
1 parent 1593ce0 commit 1a9d3c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/glob/glob.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ func Parse(file *rule.File, call *build.CallExpr) (glob rule.GlobValue) {
}
glob.Excludes = append(glob.Excludes, values...)
default:
log.Printf("skipping glob assign exclude (only list expressions are supported): %s = %T", ident.Name, e.RHS)
log.Printf("%s: skipping glob assignment exclude expression (only list expressions are supported): %s = %T", file.Path, ident.Name, e.RHS)
}
default:
log.Printf("skipping glob assignment: %s (unrecognized property)", ident.Name)
log.Printf("%s: skipping glob assignment: %s (unrecognized property)", file.Path, ident.Name)
}
}
case *build.ListExpr:
glob.Patterns = append(glob.Patterns, stringList(e)...)
case *build.Ident:
values, err := globalStringList(file, e)
if err != nil {
log.Printf("skipping list expression elem: %v", err)
log.Printf("%s: skipping list expression elem: %v", file.Path, err)
break
}
glob.Patterns = append(glob.Patterns, values...)
default:
if false {
spew.Dump(call)
log.Printf("skipping glob list expression %d: %T in %+v", i, e, call)
log.Printf("%s: skipping glob list expression %d: %T in %+v", file.Path, i, e, call)
}
}
}
Expand Down

0 comments on commit 1a9d3c0

Please sign in to comment.