Skip to content

Commit e95cf56

Browse files
authored
Run clippy CI on more targets (#16340)
This adds MacOS and Windows to the list of hosts for running the clippy job. This is intended to prevent warnings from being added to the code which happens from time to time. This still doesn't have 100% coverage of all code/targets, but this should cover the vast majority.
2 parents 1d3fb78 + b36ca36 commit e95cf56

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,17 @@ jobs:
6464

6565
# Ensure there are no clippy warnings
6666
clippy:
67-
runs-on: ubuntu-latest
67+
strategy:
68+
matrix:
69+
include:
70+
- name: Linux x86_64
71+
os: ubuntu-latest
72+
- name: macOS aarch64
73+
os: macos-14
74+
- name: Windows x86_64 MSVC
75+
os: windows-latest
76+
name: Clippy ${{ matrix.name }}
77+
runs-on: ${{ matrix.os }}
6878
steps:
6979
- uses: actions/checkout@v5
7080
- run: rustup update stable && rustup default stable

tests/testsuite/script/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::fs;
2-
use std::io::Write;
32

43
use crate::prelude::*;
54
use cargo_test_support::basic_manifest;
@@ -2179,6 +2178,7 @@ args: []
21792178
#[cargo_test(nightly, reason = "-Zscript is unstable")]
21802179
#[cfg(target_os = "linux")]
21812180
fn memfd_script() {
2181+
use std::io::Write;
21822182
use std::os::fd::AsRawFd;
21832183

21842184
let fd = memfd::MemfdOptions::new()

0 commit comments

Comments
 (0)