It should be possible to annotate files that are not in the commit
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Annotations can be generated for errors but if the error is in a file that is not part of the commit then it will just link to a line in an unrelated file that is part of the commit. It should be possible to link to files that are not part of the commit.
A simple example of where this is needed: if I have a C# project with two code files and remove a method from one that is called from the other then I will get a compiler error in the unchanged file that is calling the now removed method. Currently the annotations will display the correct filename the compiler error refers to but will link to the wrong file in the commit rather than to the correct file elsewhere in the repo that wasn't touched in this commit.
As far as I can tell this isn't currently possible. If it is possible it should be documented how for problem matchers.
Describe the enhancement
Annotations should be able to link to a file and line / column number anywhere in the repo and not only in the commit. This should be possible from problem matchers (the context in which I originally ran into this issue).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the problem matcher and annotation handling in the actions/toolkit repository, then reproduce the C# example with an error in an unchanged file. Trace how filenames and line or column numbers are converted into links. Done means an annotation can link to the referenced file anywhere in the repository, or the supported limitation is documented for problem matchers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100