clippy-check
clippy-check copied to clipboard
Add working-directory param
Allows to run clippy in subdirectories and corectly puts annotation
You can test with
- uses: reinismu/clippy-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: my-directory
args: --all-features
Related:
#93 I change cwd instead of manifest-path
#28
Is there anything blocking this PR? My team could use this now. We have a mono-repo setup and it at least seems like there is no way to "just cd into the right directory" before running the action.
I'm also interested in this but have found a temporary solution. Just replace {CARGO_SUBDIR} with your cargo project directory in your repo and {DIRS_TO_REMOVE} with all the non-cargo directories in the top-level of your repo:
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Moves all files in sub dir to top-level dir
- run: cd $GITHUB_WORKSPACE && mv {CARGO_SUBDIR}/* .
# Delete directories not to be audited
- run: cd $GITHUB_WORKSPACE && rm -rf {DIRS_TO_REMOVE}
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
I wish this would work for us but our rust code actually imports some headers with the cxx create so we're at the extreme end. If I were really dedicated to making it work I could symlink things, but it's windows so that is annoying, and or restructure.
While this is not merged in I use my repo to run actions
- uses: reinismu/clippy-check@master # switch to original when merged https://github.com/actions-rs/clippy-check/pull/158
with:
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: your-directory
While this is not merged in I use my repo to run actions
Works like a charm, thank you!
very interested in this getting merged in. monorepos don't play nice with the action as it stands
Seeing as how this repo appears to be unmaintained, and seeing as how @kristof-mattei seems to have forked it into https://github.com/actions-rs-plus/clippy-check for #165, maybe it's time to start pushing PRs that way? I don't know enough about any of the people involved to endorse one fork over another but it would be nice if some kind of consensus was reached. This is always the problem when maintainers step back...
I've merged this PR into the https://github.com/10XGenomics/clippy-check fork, which is itself a fork off of https://github.com/actions-rs-plus/clippy-check (we're pretty heavy users of clippy-check internally, and we have a few monorepos where this working directory change is vital). We'll probably make a tag there pretty soon.
Since actions-rs is an organisation it would speed things up if @svartalf could add more people with review&approve permissions
@svartalf If you're reading this please consider adding more people
As they've said elsewhere, they are not comfortable with adding strangers as additional maintainers for a project with this much usage. And they're right, unfortunately. There have been too many incidents with new maintainers surreptitiously injecting malicious code into projects; software supply chain attacks have been on the rise. It's understandable that they wouldn't want to take responsibility for adequately vetting new maintainers.
Is this pr still going on? Hope it be merged soon!
Is this pr still going on? Hope it be merged soon!
Merged here: https://github.com/actions-rs-plus/clippy-check/pull/387