Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Add support for manifest-path #93

Closed
wants to merge 1 commit into from

Conversation

dmontagu
Copy link

@dmontagu dmontagu commented Aug 26, 2020

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.

  • Adds manifest-path: option to the action
  • When manifest-path is specified, inserts --manifest-path <value> into the clippy args list
  • When manifest-path is specified, the generated annotations get the filename prefixed with the parent of the file specified via manifest-path:.

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)

@dmontagu dmontagu changed the title Add support for manifest-path (needs to be built) Add support for manifest-path Aug 26, 2020
@qwandor
Copy link

qwandor commented Apr 30, 2021

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
Copy link

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
Copy link

qwandor commented May 12, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants