actions-rs / clippy-check

📎 GitHub Action for PR annotations with clippy warnings
https://github.com/marketplace/actions/rust-clippy-check
MIT License
288 stars 41 forks source link

Add support for manifest-path #93

Closed dmontagu closed 1 year ago

dmontagu commented 4 years ago

I believe this change will enable GitHub to correctly display the annotations in-line when using a Cargo.toml that is not in the project root.

Addresses #28.


Note: I have not (yet) built the dist/index.js (because I couldn't figure out how!).

I couldn't get it to build locally with the existing package.json due to inability to find @actions-rs/core="0.1.3" on npm. I was able to get it to build locally using a local clone, but then I couldn't get to actually work in my own github actions (presumably due to doing something wrong during the build).

I'm relatively inexperienced with npm, typescript, and github actions, so would appreciate any help getting this over the line. (Or an answer to #28)

qwandor commented 3 years ago

I'm not familiar with typescript either, but this seems like a reasonable approach. What might be slightly nicer is to make the argument just path instead, and automatically add the /Cargo.toml to the end.

Either way, any chance of getting this merged and released soon?

yisonPylkita commented 3 years ago

Project I'm participating in moved rust stuff into a sub-directory and no more nice lints for us anymore. @svartalf Could you look at this PR?

qwandor commented 3 years ago

I just tried this on one of my projects and it turns out it's not enough, if the subdirectory has a .cargo/config.toml which sets important things like the the target. Actually running clippy under the subdirectory would be better.