Skip to content

Commit 7243223

Browse files
committed
add clippy fix
1 parent 485d72e commit 7243223

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

.github/workflows/benchmarks.yaml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,29 @@ on:
33
push:
44
branches:
55
- master
6-
7-
concurrency:
8-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9-
cancel-in-progress: true
106

11-
env:
12-
RUSTFLAGS: "-Awarnings"
137
jobs:
148
one:
15-
name: c2rust -> txl -> cargo check
9+
name: c2rust -> txl -> cargo-fix -> cargo check
1610
runs-on: ubuntu-latest
1711

1812
steps:
13+
##### PREPARATION STEPS ####
1914
- uses: actions/checkout@v3
2015

16+
- name: Install rust nightly toolchain
17+
uses: dtolnay/rust-toolchain@nightly
18+
2119
- name: Install rust nightly-2021-11-22 toolchain
20+
uses: dtolnay/rust-toolchain@master
21+
with:
22+
toolchain: nightly-2021-11-22
23+
24+
- name: Install rust nightly-2023-06-02 toolchain
2225
uses: dtolnay/rust-toolchain@master
2326
with:
2427
components: rustfmt
25-
toolchain: nightly-2021-11-22, nightly-2022-01-01
28+
toolchain: nightly-2023-06-02
2629

2730
- name: install prerequisites for c2rust
2831
run: sudo apt install build-essential bc llvm jq ripgrep libclang-dev cmake libssl-dev pkg-config python3 git clang bear -y
@@ -43,21 +46,32 @@ jobs:
4346
mkdir ~/.cargo/bin/Rust/
4447
cp -r txl_rules/* ~/.cargo/bin/Rust/
4548
chmod +x ~/.cargo/bin/Rust/*
49+
50+
- name: copy modified clippy exec
51+
run: cp utils/cargo-clippy ~/.cargo/bin/
52+
53+
##### CODE MODIFICATION STEPS ####
4654

4755
- name: run crusts
4856
working-directory: ./benchmark
4957
run: sh crusts.sh
5058
continue-on-error: true
5159

60+
- name: run clippy fix
61+
working-directory: ./benchmark
62+
run: sh clippy_fix.sh
63+
continue-on-error: true
64+
65+
##### GATHER DIAGNOSTICS STEPS ####
66+
5267
- name: run clippy with 30 rules
5368
working-directory: ./benchmark
5469
run: sh clippy.sh 2>log.txt
5570
continue-on-error: true
5671

57-
- name: run clippy fix
72+
- name: percentage of working projects
5873
working-directory: ./benchmark
59-
run: sh clippy_fix.sh
60-
continue-on-error: true
74+
run: sh cargo_check.sh
6175

6276
- name: clippy logs
6377
working-directory: ./benchmark

utils/cargo-clippy

1.15 MB
Binary file not shown.

0 commit comments

Comments
 (0)