actions / setup-go

Set up your GitHub Actions workflow with a specific version of Go
MIT License
1.41k stars 531 forks source link

Matchers are overzealous #501

Closed hoshsadiq closed 1 month ago

hoshsadiq commented 2 months ago

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:

Runner type:

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.

aparnajyothi-y commented 2 months ago

Hello @hoshsadiq, Thank you for creating this issue and we will look into it :)

aparnajyothi-y commented 1 month ago

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.

hoshsadiq commented 1 month ago

Thanks, will look into this.