Skip to content

Commit fbd2620

Browse files
nyurikDorianNiemiecSVRJS
authored andcommitted
run clippy on 3 major platforms
(backport <rust-lang#4411>) (cherry picked from commit e09683e)
1 parent e283d5a commit fbd2620

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ jobs:
3131
run: ./ci/style.sh
3232

3333
clippy:
34-
name: Clippy check
35-
runs-on: ubuntu-24.04
34+
name: Clippy on ${{ matrix.os }}
35+
strategy:
36+
matrix:
37+
os: [ubuntu-24.04, macos-14, windows-2022]
38+
runs-on: ${{ matrix.os }}
3639
timeout-minutes: 10
3740
steps:
3841
- uses: actions/checkout@v4
42+
- run: rustup update stable --no-self-update
3943
- uses: Swatinem/rust-cache@v2
4044
# Here we use the latest stable Rust toolchain already installed by GitHub
4145
# Ideally we should run it for every target, but we cannot rely on unstable toolchains
@@ -270,7 +274,8 @@ jobs:
270274
- test_tier2
271275
- test_tier2_vm
272276
- verify_build
273-
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
277+
- clippy
278+
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
274279
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
275280
# dependencies fails.
276281
if: always() # make sure this is never "skipped"

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,19 @@ members = [
151151
"libc-test",
152152
]
153153

154-
#
155-
# TODO: These should be renamed as `[workspace.lints.*]` once MSRV is abve 1.64
154+
# FIXME(msrv): These should be renamed as `[workspace.lints.*]` once MSRV is above 1.64
156155
# This way all crates can use it with `[lints] workspace=true` section
157-
#
158156

159157
[lints.rust]
160-
# TODO: make ident usage consistent in each file
158+
# FIXME(cleanup): make ident usage consistent in each file
161159
unused_qualifications = "allow"
162160

163161
[lints.clippy]
164-
# TODO: all these are default lints and should probably be fixed
162+
missing_safety_doc = "allow"
163+
164+
# FIXME(clippy): all these are default lints and should probably be fixed
165165
identity_op = "allow"
166166
if_same_then_else = "allow"
167-
missing_safety_doc = "allow"
168167
non_minimal_cfg = "allow"
169168
precedence = "allow"
170169
redundant_field_names = "allow"

libc-test/Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,15 @@ name = "style_tests"
105105
path = "test/style_tests.rs"
106106
harness = true
107107

108-
#
109-
# TODO: These should be moved to the root Cargo.toml as `[workspace.lints.*]` once MSRV is abve 1.64
110-
# replace it with `[lints] workspace=true`
111-
#
108+
# FIXME(msrv): These should be moved to the root Cargo.toml as `[workspace.lints.*]`
109+
# once MSRV is above 1.64 and replaced with `[lints] workspace=true`
112110

113111
[lints.rust]
114-
# TODO: make ident usage consistent in each file
112+
# FIXME(cleanup): make ident usage consistent in each file
115113
unused_qualifications = "allow"
116114

117115
[lints.clippy]
118-
# TODO: fix these, and enable pedantic lints with needed exceptions
116+
# FIXME(clippy): fix these
119117
needless_return = "allow"
120118
comparison_to_empty = "allow"
121119
unused_io_amount = "allow"

0 commit comments

Comments
 (0)