Skip to content

Commit 514a386

Browse files
author
Hergy Fongue
committed
fixed commit
Signed-off-by: Hergy Fongue <hergy.fongue@ext.markant.com>
1 parent ebf7056 commit 514a386

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed

.github/workflows/linter.yaml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@ permissions:
55

66
on:
77
push:
8+
paths:
9+
- ".github/workflows/linter.yml"
10+
- "**.rs"
11+
- "**.toml"
12+
- "**/Cargo.lock"
13+
- "**/Makefile"
814
branches: [ "main" ]
915
pull_request:
16+
paths:
17+
- ".github/workflows/linter.yml"
18+
- "**.rs"
19+
- "**.toml"
20+
- "**/Cargo.lock"
21+
- "**/Makefile"
1022
branches: [ "main" ]
1123
workflow_dispatch:
1224
inputs:
@@ -24,12 +36,12 @@ defaults:
2436
jobs:
2537
lint_commits:
2638
name: Lint Commit Messages
27-
runs-on: ubuntu-20.04
39+
runs-on: ubuntu-22.04
2840
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
2943
- name: Check Commit Lint
30-
uses: wagoid/commitlint-github-action@v5.0.0
31-
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
uses: wagoid/commitlint-github-action@v5.4.5
3345

3446
lint_check:
3547
name: Rust - lint_${{ matrix.lint_projects }}
@@ -43,10 +55,26 @@ jobs:
4355
- cargo_deny
4456
- cargo_toml_files
4557
steps:
46-
- name: Checkout repository
47-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
58+
- uses: actions/checkout@v4
59+
- name: Install rust
60+
uses: actions-rs/toolchain@v1
61+
with:
62+
toolchain: stable
63+
- name: Rust Cache
64+
uses: actions/cache@v2
65+
continue-on-error: false
4866
with:
49-
ref: ${{ github.event.inputs.commit_sha }}
67+
path: |
68+
~/.cargo/bin
69+
~/.cargo/registry/index/
70+
~/.cargo/registry/cache/
71+
~/.cargo/git/db/
72+
target/
73+
key: ${{ runner.os }}-rust-sdk-${{ hashFiles('**/Cargo.lock') }}
74+
restore-keys: |
75+
${{ runner.os }}-rust-sdk-
76+
- name: Check cargo version
77+
run: cargo --version
5078
- name: Run lint ${{ matrix.lint_projects }}
5179
run: make -f Makefile lint_${{ matrix.lint_projects }}
5280

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,16 @@ check_cargo_update:
2727
# cargo check --locked
2828

2929
lint: lint_cargo_fmt_check lint_cargo_deny lint_cargo_clippy
30-
3130
lint_cargo_fmt_check:
3231
cargo fmt --all -- --check
33-
3432
lint_cargo_deny:
3533
cargo deny --all-features \
3634
check licenses advisories\
3735
--config=tools/cargo-deny/deny.toml
38-
3936
lint_cargo_clippy:
4037
cargo clippy --no-deps --all-targets -- -D warnings
41-
4238
lint_cargo_toml_files:
43-
dprint check --config tools/dprint/dprint.json
39+
dprint check --config=tools/dprint/dprint.json
4440

4541
clean:
4642
cargo clean

tools/cargo-deny/deny.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ unlicensed = "deny"
1010
copyleft = "deny"
1111
confidence-threshold = 0.95
1212
allow = [
13-
"MIT",
1413
"Apache-2.0",
14+
"MIT",
15+
]
16+
exceptions = [
17+
{ name = "cloudabi", allow = ["BSD-2-Clause"] },
1518
]
16-
exceptions = []
1719

1820
[advisories]
1921
unmaintained = "deny"
2022
vulnerability = "deny"
21-
#Determines what happens when a crate with a version that has been yanked from its source registry is encountered.
2223
yanked = "warn"
23-
ignore = []
2424
# Users who require or prefer Git to use SSH cloning instead of HTTPS,
2525
# such as implemented via "insteadOf" rules in Git config, can still
2626
# successfully fetch advisories with this enabled.

0 commit comments

Comments
 (0)