bazelbuild / rules_go

Go rules for Bazel
Apache License 2.0
1.37k stars 651 forks source link

[nogo] match regexp againts relative paths #3898

Closed scaiper closed 6 months ago

scaiper commented 6 months ago

What type of PR is this?

Feature

What does this PR do? Why is it needed? This PR makes it so that regular expressions in only_files and exclude_files are matched against relative paths. This allows use of anchored regexps.

Which issues(s) does this PR fix?

Fixes #3250

Other notes for review

This overwriting of stderr have caused a lot of surprise when I was trying to debug-print filenames from inside of nogo. https://github.com/bazelbuild/rules_go/blob/aeb83e878033ef357642c87122e193df44da03fe/go/tools/builders/env.go#L140