-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem matcher annotations are created on the wrong file #224
Comments
@chrispat fyi. pretty interesting feedback. i like this idea |
We have a work item to fix the problem where annotations with no valid path will not be attributed to the workflow file. I think once that is done you won’t have the problem that you currently see where files that can’t be found are improperly attributed. |
@chrispat today unrooted paths are rooted against the github.workspace. The feedback is to root against the |
Ah, I missed that. That make sense. |
Any concern that we may not know the working directory in the case of many actions? For all JavaScript actions the working directory from the perspective of the runner will be the same as github.workspace, however, in the code the action author could have changed that via process.chdir() and the problem matcher code would not know. |
@ericsciple, when you say:
Is that what I'm seeing when I get these notes in the annotations of GitHub Actions: I've cheated in my problem matcher by adding {
"problemMatcher": [
{
"owner": "phpcs-csv",
"pattern": [
{
"regexp": "^\"\\/github\\/workspace\\/(.*)\",(\\d+),(\\d+),(\\w+),\"([^\"]+\",[^,+]*)",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
} This is currently a private repo for PHP CodeSniffer, which outputs lines like:
Is there a better way, or is this issue the right place to track the problem? |
@edhgoose can you confirm the step is a container action (i.e. |
This is in
So, yes I think is the answer to your question. Maybe best if you open the issue, as you probably can describe the problem better? |
Should be fixed by actions/runner#269 |
I'm trying to replace one of my actions with a problem matcher since that fits in to the workflow better, but all of the annotations are being created on the workflow file. The step that's creating them (
npm test
) is being run withworking-directory: src/website
which causes the log output to be rooted in the sub folder.This is the default output from stylelint:
I saw in #198 that there's a
fromPath
value that can be used to set the base path of the annotation file. Is there a way to default that to theworking-directory
value if the file in question couldn't be found?The text was updated successfully, but these errors were encountered: