Add support to prepend the filename #86
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




When using this annotator, it can be hard to identify what file has caused the issue from the GitHub Actions log output, as we'll get something like this:
The GitHub UI doesn't easily translate those messages to the filename that is affected, which means that on large PRs it can be a little tricky just looking at this output to see what file has changed. I have to trawl through the files changed to find the relevant output.
We would find it useful/beneficial to be able to see the filename in the GitHub Actions log too.
It doesn't appear that you can get just the message (e.g. https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#setting-a-warning-message says it just prints the "message" - not the file).
Therefore, I've added a
--prepend-filenamearg like the--prepend-sourceto make finding these a little easier. I appreciate it's probably not for everyone (as it'll also put the filename in the message on the annotation) but thought it might be helpful?