Skip to content

Commit

Permalink
ci(clippy): Enable clippy ci for all pushs & prs
Browse files Browse the repository at this point in the history
  • Loading branch information
PotentialStyx committed Jan 22, 2024
1 parent 64c4505 commit ae7415e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"on": { "push": {}, "pull_request": {} },
"name": "Clippy",
"permissions": { "security-events": "write" },
"jobs":
{
"enforce-clippy":
{
"runs-on": "ubuntu-latest",
"steps":
[
{
"name": "Checkout",
"uses": "actions/checkout@v4",
},
{
"name": "Install Rust",
"uses": "dtolnay/rust-toolchain@master",
"with":
{
"components": "clippy",
"toolchain": "nightly-2024-01-01",
},
},
{
"name": "Cache",
"uses": "Swatinem/rust-cache@v2",
},
{
"name": "Install tools",
"run": "cargo install clippy-sarif sarif-fmt",
},
{
"name": "Generate SARIF",
"run":
"cargo clippy --all-features --message-format=json |
clippy-sarif | tee results.sarif | sarif-fmt",
},
{
"name": "Upload SARIF file",
"uses": "github/codeql-action/upload-sarif@v2",
"with": { "sarif_file": "results.sarif" },
},
],
},
},
}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly"
channel = "nightly-2024-01-01"

0 comments on commit ae7415e

Please sign in to comment.