Matchers: Error annotations catch things that are not errors and not even in Go code
See original GitHub issueConsider the (totally valid) makefile:
all: foo
echo Done
include Foo.mk
Foo.mk:
printf 'foo:\n\techo foo\n' > $@
On the first run of make
, this generates
Makefile:4: Foo.mk: No such file or directory
printf 'foo:\n\techo foo\n' > Foo.mk
echo foo
foo
echo Done
Done
There 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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Working with Errors in Go 1.13
The Go 1.13 errors package includes two new functions for examining errors: Is and As . The errors.Is function compares an error to...
Read more >How to Add Extra Information to Errors in Go - DigitalOcean
In Go 1.13, new features were added to make it easier to add extra information to errors: fmt.Errorf, errors.Is , and errors.
Read more >Has there been any talks recently to improve Error Handling in ...
I love the way Go treats errors as values and forces you to deal with them right there, makes code way more readable....
Read more >Dave Cheney - Dont Just Check Errors Handle Them Gracefully
GopherCon 2022: Jeremy Brown - Parsing w/o Code Generators: Parser Combinators in Go with Generics. Gopher Academy. Gopher Academy.
Read more >30. Errors and Exception Handling | Python Tutorial
An exception is an error that happens during the execution of a program. Exceptions are known to non-programmers as instances that do not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems to work well, thanks!
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.