giraffate / clippy-action Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: giraffate/clippy-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Local output:
๐ช Windows 11 Enterprise(10.0.23580) (pwsh) fix-arm64 on ๎ fix-clippy-pipeline [$] via ๐ฆ v1.73.0
at 04:29:46 PM โฏ cargo --version
cargo 1.73.0 (9c4383fb5 2023-08-26)
๐ช Windows 11 Enterprise(10.0.23580) (pwsh) fix-arm64 on ๎ fix-clippy-pipeline [$] via ๐ฆ v1.73.0
at 04:29:51 PM โฏ git rev-parse HEAD
f4a1cc0cc0cbe87364b30e3a5ec076db93247bef
๐ช Windows 11 Enterprise(10.0.23580) (pwsh) fix-arm64 on ๎ fix-clippy-pipeline [$] via ๐ฆ v1.73.0
at 04:29:53 PM โฏ cargo clippy
Compiling wdk-build v0.1.0 (D:\git-repos\github\windows-drivers-rs.git\fix-arm64\crates\wdk-build)
error: you should put bare URLs between `<`/`>` or make a proper Markdown link
--> crates\wdk-build\src\cargo_make.rs:20:53
|
20 | /// `clap` uses an exit code of 2 for usage errors: https://github.com/clap-rs/clap/blob/14fd853fb9c5b94e371170bbd0ca2bf28ef3abff/clap_builder/src/util/mod.rs#L30C18-L30C28
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
note: the lint level is defined here
--> crates\wdk-build\src\lib.rs:16:9
|
16 | #![deny(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::doc_markdown)]` implied by `#[deny(clippy::pedantic)]`
error: docs for function which may panic missing `# Panics` section
--> crates\wdk-build\src\cargo_make.rs:324:1
|
324 | pub fn validate_and_forward_args() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> crates\wdk-build\src\cargo_make.rs:335:13
|
335 | / env_args
336 | | .remove(TOOLCHAIN_ARG_POSITION)
337 | | .to_string_lossy()
338 | | .strip_prefix('+')
339 | | .expect("Toolchain arg should have a + prefix")
| |_______________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `#[deny(clippy::missing_panics_doc)]` implied by `#[deny(clippy::pedantic)]`
error: could not compile `wdk-build` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `wdk-build` (lib) due to 2 previous errors
clippy action(from https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:2)771/Microsoft.DesktopAppInstaller_8wekyb[3](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836 in wmmc88/windows-drivers-rs#13):
Run giraffate/clippy-action@v1
with:
tool_name: Clippy
clippy_flags: --locked --profile dev --all-targets -- -D warnings
reporter: github-check
github_token: ***
filter_mode: nofilter
fail_on_error: true
level: info
workdir: .
reviewdog_version: latest
env:
LatestWingetDownloadUri: https://github.com/microsoft/winget-cli/releases/download/v1.6.[2](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:2)771/Microsoft.DesktopAppInstaller_8wekyb[3](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:3)d8bbwe.msixbundle
LatestWingetLicenseDownloadUri: https://github.com/microsoft/winget-cli/releases/download/v1.6.2771/27abf0d1afe3[4](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:4)0e7a64fb6960[5](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:5)[6](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:6)b26[7](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:7)2_License1.xml
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
๐ถ Installing reviewdog ... https://github.com/reviewdog/reviewdog
finding a release for latest
downloading from https://github.com/reviewdog/reviewdog/releases/download/v0.15.0/reviewdog_0.15.0_Windows_x[8](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:8)6_64.tar.gz
extracting
C:\Windows\system32\tar.exe xz -C D:\a\_temp\reviewdog-RAKtEN -f D:\a\_temp\[9](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:9)a6feb82-21c1-4154-bee7-0730f9e37f86
Running Clippy with reviewdog ๐ถ ...
D:\a\_temp\reviewdog-RAKtEN\reviewdog.exe -efm=<pre><code>%E%f:%l:%c:%t:%m -efm=%E%f:%l:%c:%t:%m -efm=%Z__END__ -efm=%C%m</code></pre> -efm=%C%m -efm=%C -name=Clippy -reporter=github-check -filter-mode=nofilter -fail-on-error=true -level=info
2023/11/[10](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:10) 00:20:00 [Clippy] reported: https://github.com/wmmc88/windows-drivers-rs/runs/[18](https://github.com/wmmc88/windows-drivers-rs/actions/runs/6818832114/job/18545139836#step:6:19)545690569 (conclusion=success)
possibly related to #46 ?
I'm not sure if this is actually a bug, but I didn't see a chat platform for this repo. I'm trying to add this action to cargo-sweep and I'm not seeing CI fail or annotations being generated, even though clippy shows warnings locally: https://github.com/holmgr/cargo-sweep/actions/runs/3773852477/jobs/6415601213#step:5:30
reviewdog: Reporting results for "clippy"
reviewdog: No results found for "clippy". 3 results found outside diff.
Do you know what could be going wrong here? There's a warning above that GITHUB_TOKEN is missing permissions but I wouldn't expect that to be related. "3 results found outside diff" makes me think the warnings are being generated but filtered out, or something like that?
When using github-check
reporter, a PR's checks tab will show clippy-action
's check under a random job.
- name: Run Cargo Clippy
uses: giraffate/clippy-action@v1
with:
tool_name: Clippy
clippy_flags: --locked --profile ${{ matrix.cargo_profile }} --all-targets -- -D warnings
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'github-check' }}
github_token: ${{ secrets.GITHUB_TOKEN }}
filter_mode: nofilter
fail_on_error: true
When run with the above config (and triggered by a push), the resulting check will show up under a random job (i think its the first job to start). Example:
The above clippy check(triggered by push) is a step in the Lint job, but in the Checks tab of the PR, it shows under the Test Job (on other executions, it shows under different Jobs).
In https://github.com/burn-rs/burn we use scripts to maintain locally and CI checks coherently and with the minimum maintenance effort.
Would it be possible to add an option that does not run the cargo clippy
present in the action, but just takes the --manifest-path json
output produced by an external clippy action and parses that?
i'm seeing quite different output from clippy in CI and locally. Any ideas?
output in CI - https://github.com/jhelovuo/RustDDS/actions/runs/4210445465/jobs/7308142488
output from local clippy run-
cargo +nightly clippy --all --all-targets
warning: associated function `data` is never used
--> src/dds/ddsdata.rs:73:10
|
73 | pub fn data(&self) -> Bytes {
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: associated function `payload_bytes` is never used
--> src/dds/ddsdata.rs:78:6
|
78 | fn payload_bytes(&self) -> Bytes {
| ^^^^^^^^^^^^^
warning: associated function `get_reader_and_history_cache_change` is never used
--> src/dds/message_receiver.rs:129:6
|
129 | fn get_reader_and_history_cache_change(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: associated function `get_reader_and_history_cache_change_object` is never used
--> src/dds/message_receiver.rs:146:6
|
146 | fn get_reader_and_history_cache_change_object(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: associated function `history_cache_change_data` is never used
--> src/dds/reader.rs:291:10
|
291 | pub fn history_cache_change_data(&self, sequence_num...
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: `rustdds` (lib test) generated 5 warnings
Finished dev [unoptimized + debuginfo] target(s) in 0.07s
warning: the following packages contain code that will be rejected by a future version of Rust: traitobject v0.1.0
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
note the errors present in CI that aren't present in local run
There's a tool called cargo-cranky
that allows actually configuring clippy lints project-wise (which, by the looks of it, won't land in clippy for another few years...).
Would it be possible to support it? (requires two things - cargo install cargo-cranky and change clippy->cranky when invoking cranky, as command line arguments should be the same).
i'm working on a repo that has a number of clippy warnings. I would like these to be reported, but not fail the job (clippy errors should fail the job, but not warnings)
how to i stop this action from escalating warnings into hard errors?
see https://github.com/mavlink/rust-mavlink/actions/runs/3575705031/jobs/6012579389
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.