Skip to content

Commit

Permalink
Simplified Clippy and fmt calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
Helios-vmg committed Nov 7, 2024
1 parent b134406 commit d7dcf9e
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/general-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:

env:
CARGO_TERM_COLOR: always
PYTHONUNBUFFERED: 1

jobs:
format:
Expand All @@ -26,11 +25,6 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Update Rust Toolchain
run: rustup update

Expand All @@ -40,8 +34,13 @@ jobs:
- name: Install rustfmt
run: rustup component add rustfmt --toolchain nightly

- name: Check Format
run: python scripts/run-fmt.py --dir test-cases detectors
- name: Check Format (detectors)
working-directory: detectors
run: cargo fmt -- --check -v

- name: Check Format (test cases)
working-directory: test-cases
run: cargo fmt -- --check -v

clippy:
name: Lint with Clippy
Expand All @@ -52,11 +51,6 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Cache Rust Dependencies
uses: actions/cache@v4
with:
Expand All @@ -71,15 +65,9 @@ jobs:
- name: Install Rust nightly
run: rustup install nightly-2023-12-16 --profile minimal

- name: Install dylint-link
run: cargo install dylint-link

- name: Install clippy
run: rustup component add clippy --toolchain nightly-2023-12-16

- name: Default to nightly
run: rustup default nightly-2023-12-16

- name: Install required srcs
run: rustup component add rust-src --toolchain nightly-2023-12-16-x86_64-unknown-linux-gnu

Expand All @@ -89,9 +77,6 @@ jobs:
- name: Free-space claim-usage report1
run: du -hs /opt/hostedtoolcache/*

- name: Free-space claim-usage report2
run: du -hs /opt/hostedtoolcache/Python/*

- name: Free-space claim-usage report3
run: (ls -la /usr/local/share && du -hs /usr/local/share/boost) || true

Expand Down Expand Up @@ -125,8 +110,13 @@ jobs:
- name: Free-space claim-usage report1
run: du -hs /opt/hostedtoolcache/*

- name: Lint with Clippy
run: python scripts/run-clippy.py --dir test-cases detectors
- name: Lint with Clippy (detectors)
working-directory: detectors
run: cargo clippy --all-features -- -D warnings

- name: Lint with Clippy (test cases)
working-directory: test-cases
run: cargo +nightly-2023-12-16 clippy --target=wasm32-unknown-unknown -Zbuild-std=std,core,alloc --no-default-features -- -D warnings -A clippy::new_without_default

comment-on-pr:
name: Comment on PR
Expand Down

0 comments on commit d7dcf9e

Please sign in to comment.