Skip to content

Commit f7f1265

Browse files
authored
Merge pull request #2 from cabrownlie:fix-github-action-warnings
Update rust-clippy.yml workflow
2 parents fe017a6 + 2ca2260 commit f7f1265

File tree

5 files changed

+248
-234
lines changed

5 files changed

+248
-234
lines changed

.devcontainer/devcontainer.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "Rust",
3+
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",
4+
"mounts": [
5+
{
6+
"source": "devcontainer-cargo-cache-${devcontainerId}",
7+
"target": "/usr/local/cargo",
8+
"type": "volume"
9+
}
10+
]
11+
}

.github/dependabot.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

.github/workflows/rust-clippy.yml

+11-20
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
# rust-clippy is a tool that runs a bunch of lints to catch common
6-
# mistakes in your Rust code and help improve your Rust code.
7-
# More details at https://github.com/rust-lang/rust-clippy
8-
# and https://rust-lang.github.io/rust-clippy/
9-
101
name: rust-clippy analyze
112

123
on:
@@ -25,18 +16,18 @@ jobs:
2516
permissions:
2617
contents: read
2718
security-events: write
28-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
19+
actions: read
2920
steps:
30-
- name: Checkout code
31-
uses: actions/checkout@v4
32-
33-
- name: Install Rust toolchain
34-
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
21+
- uses: actions/checkout@v4
22+
- uses: actions/cache@v4
3523
with:
36-
profile: minimal
37-
toolchain: stable
38-
components: clippy
39-
override: true
24+
path: |
25+
~/.cargo/bin/
26+
~/.cargo/registry/index/
27+
~/.cargo/registry/cache/
28+
~/.cargo/git/db/
29+
target/
30+
key: ubuntu-latest-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
4031

4132
- name: Install required cargo
4233
run: cargo install clippy-sarif sarif-fmt
@@ -49,7 +40,7 @@ jobs:
4940
continue-on-error: true
5041

5142
- name: Upload analysis results to GitHub
52-
uses: github/codeql-action/upload-sarif@v1
43+
uses: github/codeql-action/upload-sarif@v3
5344
with:
5445
sarif_file: rust-clippy-results.sarif
5546
wait-for-processing: true

rustfmt.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hard_tabs = true

0 commit comments

Comments
 (0)