Matchers are overzealous
hoshsadiq opened this issue · 3 comments
Description:
The matcher ^\s*(.+\.go):(?:(\d+):(\d+):)? (.*)
is way too broad (see regex101).
We are using go-generate-fast which outputs the results at the end of a go generate command as follows:
options.go: echo hello! (generated, noplugin, 2ms)
This gets caught by the matcher.
Action version:
latest
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.
Expected behavior:
It should not be matching non-errors that start with filename.go:
Actual behavior:
It is matching non-errors that start with filename.go:
It would be great to be able to disable the matchers in some way.
Hello @hoshsadiq, Thank you for creating this issue and we will look into it :)
Hi @hoshsadiq, Thank you for creating this issue. We've reviewed the regex and found that it is indeed too broad, matching lines that are not actual error messages. For instance, the output:
options.go: echo hello! (generated, noplugin, 2ms)
from the go-generate-fast tool gets incorrectly caught by this matcher. This occurs because the regex cannot distinguish between real error messages and other output that matches the pattern.
If this is causing problems, you can disable the problem matcher by following the instructions here: Problem Matchers.
To update the regex to focus specifically on error messages, this change may have side effects, such as missing certain warnings or outputs that could be useful for debugging. We will ensure thorough testing before making any adjustments.
Please feel free to reach out if you have any further concerns or need clarifications.
Thanks, will look into this.