-
Notifications
You must be signed in to change notification settings - Fork 17
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
clippy needs a way to prefix paths #370
Comments
@ImUrX can you provide more details or a minimal reproducible example? ex. where are you running clippy from? in general these tools (clippy-sarif) just take whatever's output by clippy directly, so I'm not sure it makes sense to add extra logic to modify those results. but would like to understand more what's going on. |
I have a workspace but I have a certain folder excluded. |
The alternative would be to just use |
So, my ideas are:
I want this solved, I really like the integration of clippy with GitHub idea but I can't really use it currently :c |
I was able to solve this issue by prepending the path to the working directory. I.e. let's assume I run cat results.sarif \
| jq --arg pwd "apps/my-crate" '.runs[].results[].locations[].physicalLocation.artifactLocation.uri |= $pwd + "/" + .' \
> results.sarif.tmp
mv results.sarif.tmp results.sarif GitHub then correctly can resolve the paths. |
Thanks -- this is still on my list to resolve, I just haven't had much time to get to things here. |
thanks for that, @TimDiekmann, that helped a lot and is a good workaround! |
I have my rust project inside a folder, the problem is that the paths returned by the SARIF are not taking that into account. Is there a way to prefix them?
The text was updated successfully, but these errors were encountered: