Using a switch like --format github, --github or similar, this could possibly be a cleaner alternative to the problem matcher.
Note: I didn't check if it just creates the annotation in the diff view or also shows it nicely in the text output though. Just saw this in ruff and it sounds like a nice and easy way to get "rich" CI warnings w/o having to put the problem matcher json file in your own repo.