Comments (7)
Using the --manifest-path
option to specify the Cargo.toml
file seems to ensure the action works, but it doesn't seem to get the paths right (they are relative to where Cargo.toml lives, not the repository root), so the feedback can't be viewed from the files view of the PR. (Though they it does appear in the checks list.)
Any suggestions for a workaround?
from clippy-check.
It's really unfortunate that Github Actions doesn't support working-dir
in a use
context, huge oversight! Hopefully they can address it soon.
While they work on that though, for anyone who is having trouble using this Action because of that limitation, this might help:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --manifest-path path/to/Cargo.toml
--manifest-path
allows you to essentially set the working dir of the crate, since it seems like the Clippy action runs relative to wherever the specified Cargo.toml
lives.
from clippy-check.
I might miss something here, but would not working-directory
just work in this case too?
from clippy-check.
When you define a step, you can use either run
or uses
. You can specify working-directory
only if you choose run
- and when you look at the documentation, it's mentioned only there. I tried to use it with uses
, but unfortunately after applying some ideas I didn't manage to get it working - sometimes it was ignored, sometimes it caused a workflow format error.
from clippy-check.
Ah, yes, you are right, my mistake. It feels, though, that GitHub should support that on a global level, as re-implementing the same thing each time in every Action feels quite redundant.
Maybe it worth to file an issue to GitHub?
from clippy-check.
I see your point. I didn't know where I should file an issue, so I sent an email to [email protected].
from clippy-check.
The problem with the --manifest-path
approach is that it doesn't use the .cargo/config
under the crate directory. This may be a problem if it specifies a different build.target
than the default, e.g. for embedded software that only builds on a particular architecture.
from clippy-check.
Related Issues (20)
- Annotations fail on jobs with multiple targets
- clippy job succeeds even when clippy_check fails
- Option to only create annotations instead of using a separate check run
- Support outputing raw 'clippy' output into a file HOT 2
- [Documentation] Mention github_token required permissions HOT 1
- Clippy action not properly reporting ICEs
- Maintenance Status HOT 3
- Cannot output to SARIF file HOT 1
- Use the new GitHub job summaries
- Resource not accessible by integration (no fork involved) HOT 6
- Need to update to Node 16 HOT 3
- Check failing with "Resource not accessible by integration" HOT 26
- JSON output failing to be parsed HOT 1
- `toolchain` argument doesn't work? HOT 4
- result annotation sometimes gets added to the wrong workflow HOT 2
- ##[error]Validation Failed: {"resource":"CheckRun","code":"invalid","field":"annotations"}
- Quiet / silent flag
- Option: Set commit status to failed if any lint warnings are posted HOT 2
- Add option to fail check on warnings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clippy-check.