Add new report format for GitHub
Feature request
There are multiple report formats, defined here.
We shall introduce new "github" report format (for GitHub Actions "workflow commands"). GitHub Actions can pickup output lines in a specific format to process them into instructions. One of these "commands" is ::error which will result in a message on the pull request file diff somewhat te same as when a real human leaves a comment on a specific line in a specific file of your PR.
Details are here: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
Example:

I could try to make a PR for this. I was thinking of adding a new output format --format=github. Is that a good approach?
That sounds nice ! Can we have a schema file for it, like we do for other formats?
Apparently there's a new "GithubActionReporter to render annotations in a Github Action" introduced in the upcoming Symfony Console 5.3 version, which would be ideal to use, but would cause this feature only usable up from Symfony (Console) 5.3.
https://github.com/symfony/symfony/blob/5.x/src/Symfony/Component/Console/CHANGELOG.md
Can we have a schema file for it, like we do for other formats?
I doubt there can be a schema as the format is textual and can be in between other output.
for this to be really useful, line numbers would need to be reported, but, alas, #3601
Adding a reference to https://github.com/nextcloud/server/pull/21813 where this has been achieved through checkstyle format + cs2pr tool.
for this to be really useful, line numbers would need to be reported, but, alas, #3601
Have been reading the whole discussion there 😄 Indeed, for this to be (really) useful, line numbers should be available. GitHub however also accepts line number null and will report the warnings/errors on "file level".
feel free to propose (maybe as separated PR) a good way how to bring line-numbers in place ;)
Since this issue has not had any activity within the last 90 days, I have marked it as stale.
I will close it if no further activity occurs within the next 30 days.
FYI: Some ideas can be taken from #7089, also see #7171 (especially this comment and this conclusion).