Skip to content

Commit

Permalink
Add clippy using latest rust version to CI
Browse files Browse the repository at this point in the history
Fixes: #1511
  • Loading branch information
tmccombs committed Apr 15, 2024
1 parent 3cd73d7 commit cf6ff87
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ jobs:
- uses: actions/checkout@v4
- run: cargo fmt -- --check

lint_check:
name: Ensure 'cargo clippy' has no warnings
runs-on: ubuntu-latest
steps:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: actions/checkout@v4
- run: cargo clippy --all-targets --all-features -- -Dwarnings

min_version:
name: Minimum supported rust version
runs-on: ubuntu-20.04
Expand Down
4 changes: 3 additions & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,14 +1311,16 @@ fn test_type_executable() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);

fs::OpenOptions::new()
.create(true)
.create_new(true)
.truncate(true)
.write(true)
.mode(0o777)
.open(te.test_root().join("executable-file.sh"))
.unwrap();

fs::OpenOptions::new()
.create(true)
.truncate(true)
.write(true)
.mode(0o645)
.open(te.test_root().join("not-user-executable-file.sh"))
Expand Down

0 comments on commit cf6ff87

Please sign in to comment.