-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matchers: Error annotations catch things that are not errors and not even in Go code #46
Comments
I think this action does the right thing. Perhaps the issue is service side which turns output into warning and error annotations. @joshmgross to verify whether there's anything we can do action side. |
No, I'm pretty sure this is an issue with your matcher being overzealous: Line 7 in 1c06f0e
This claims that every single output line containing two |
Ahhh. OK. Thanks @JasonGross @thboop has another issue on the matcher so maybe he can look at both together. |
@JasonGross if it's causing problems there's also a way to disable the problem matcher. https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers We added that feature since the scope of a problem matcher is a job and scripts / steps downstream could get false hits. |
I think the solution is to have a much tighter regex for compile errors and then if there's things it misses, problem matchers supports having multiple matchers. I'll have a PR soon for the v2-beta lineage. |
As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
Oh, neat! Thanks! Do you know why this isn't documented at https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md ? |
We can add there. In the meantime, I'm also working on a better solution. |
As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
Add coq matcher in actions As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
Add coq matcher in actions As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
Add coq matcher in actions As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
@JasonGross I have a PR that might help: #48 You can try it out with I added tests but it would be great to verify before merging. |
I'm running a test here: https://github.com/mit-plv/fiat-crypto/pull/703/checks?check_run_id=547046526 |
Add coq matcher in actions As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
Add coq matcher in actions As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
Add coq matcher in actions As per https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers h/t actions/setup-go#46 (comment) for pointing out that this is possible
Thanks for validating. This is now in |
Errors reported by Go, even when containing relative paths, do not always begin with ./ or ../ – for example: $ go build ./... # honnef.co/go/tools/lintcmd lintcmd/format.go:28:8: syntax error: cannot use path := filepath.Clean(pos.Filename) as value Related, linters commonly used with Go (such as Staticcheck) do not prefix paths with ./ either. This change slightly relaxes the stricter pattern that was introduced as part of v2 to address actions#46. The pattern is still stricter than it was in v1, and probably as strict as it can be.
Errors reported by Go, even when containing relative paths, do not always begin with ./ or ../ – for example: $ go build ./... # honnef.co/go/tools/lintcmd lintcmd/format.go:28:8: syntax error: cannot use path := filepath.Clean(pos.Filename) as value Related, linters commonly used with Go (such as Staticcheck) do not prefix paths with ./ either. This change slightly relaxes the stricter pattern that was introduced as part of v2 to address actions#46. The pattern is still stricter than it was in v1, and probably as strict as it can be.
Errors reported by Go, even when containing relative paths, do not always begin with ./ or ../ – for example: $ go build ./... # honnef.co/go/tools/lintcmd lintcmd/format.go:28:8: syntax error: cannot use path := filepath.Clean(pos.Filename) as value We could require either ./, ../ or at least one path separator and still match Go's output. However, commonly used linters (such as Staticcheck and golint) never use ./ for relative paths. Their output stopped being matched when we moved from v1 to v2. I believe that being able to match the output of linters is worth relaxing the pattern for. This change slightly relaxes the stricter pattern that was introduced as part of v2 to address actions#46. However, the pattern is still stricter than it was in v1 and as strict as it can be for most users.
Consider the (totally valid) makefile:
On the first run of
make
, this generatesThere isn't really a good way to suppress this warning (see this StackOverflow question I asked) without massively complicating the Makefile. I don't mind seeing this warning on the first
make
. However, my github actions go job decides that this is an error (it's not; it's non-fatal), and annotates every single pull request on my repository with an error on the relevant line on the Makefile. Please fix the annotation to not do this.The text was updated successfully, but these errors were encountered: