Skip to content

Commit

Permalink
Run clippy in the CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielT committed Dec 6, 2024
1 parent 7d88477 commit d1062b6
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 27 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Rust build & test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release
- name: Run tests
env:
RUST_BACKTRACE: 1
run: cargo test

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
#run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-features -- -D warnings


24 changes: 0 additions & 24 deletions .github/workflows/rust.yml

This file was deleted.

6 changes: 3 additions & 3 deletions src/update/typedef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ mod test {
);
assert!(!(*tdu.is_calib_struct.get("DeadEnd").unwrap()));
assert!(!(*tdu.is_calib_struct.get("DeadEnd2").unwrap()));
assert!(tdu.is_calib_struct.get("Unconnected").is_none());
assert!(!tdu.is_calib_struct.contains_key("Unconnected"));
}

#[test]
Expand Down Expand Up @@ -2170,7 +2170,7 @@ mod test {

let version = A2lVersion::from(&a2l);
let mut log_msgs = Vec::new();
let mut info = A2lUpdateInfo {
let info = A2lUpdateInfo {
debug_data: &debug_data,
preserve_unknown: false,
strict_update: false,
Expand All @@ -2180,7 +2180,7 @@ mod test {
compu_method_index: HashMap::new(),
};
update_module_typedefs(
&mut info,
&info,
&mut a2l.project.module[0],
&mut log_msgs,
typedef_ref_info,
Expand Down

0 comments on commit d1062b6

Please sign in to comment.