Skip to content

Commit e09683e

Browse files
committed
run clippy on 3 major platforms
1 parent 5997a8b commit e09683e

File tree

5 files changed

+25
-27
lines changed

5 files changed

+25
-27
lines changed

.github/workflows/ci.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ jobs:
3030
run: ./ci/style.sh
3131

3232
clippy:
33-
name: Clippy check
34-
runs-on: ubuntu-24.04
33+
name: Clippy on ${{ matrix.os }}
34+
strategy:
35+
matrix:
36+
os: [ubuntu-24.04, macos-14, windows-2022]
37+
runs-on: ${{ matrix.os }}
3538
timeout-minutes: 10
3639
steps:
3740
- uses: actions/checkout@v4
41+
- run: rustup update stable --no-self-update
3842
- uses: Swatinem/rust-cache@v2
3943
# Here we use the latest stable Rust toolchain already installed by GitHub
4044
# Ideally we should run it for every target, but we cannot rely on unstable toolchains
@@ -299,7 +303,8 @@ jobs:
299303
- verify_build
300304
- ctest_msrv
301305
- docs
302-
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
306+
- clippy
307+
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
303308
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
304309
# dependencies fails.
305310
if: always() # make sure this is never "skipped"

Cargo.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,19 @@ members = [
143143
"libc-test",
144144
]
145145

146-
#
147-
# TODO: These should be renamed as `[workspace.lints.*]` once MSRV is abve 1.64
146+
# FIXME(msrv): These should be renamed as `[workspace.lints.*]` once MSRV is above 1.64
148147
# This way all crates can use it with `[lints] workspace=true` section
149-
#
150148

151149
[lints.rust]
152-
# TODO: make ident usage consistent in each file
150+
# FIXME(cleanup): make ident usage consistent in each file
153151
unused_qualifications = "allow"
154152

155153
[lints.clippy]
156-
# TODO: all these are default lints and should probably be fixed
154+
missing_safety_doc = "allow"
155+
156+
# FIXME(clippy): all these are default lints and should probably be fixed
157157
identity_op = "allow"
158158
if_same_then_else = "allow"
159-
missing_safety_doc = "allow"
160159
non_minimal_cfg = "allow"
161160
precedence = "allow"
162161
redundant_field_names = "allow"

ctest-test/Cargo.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,14 @@ test = false
2929
name = "t2_cxx"
3030
test = false
3131

32-
#
33-
# TODO: These should be moved to the root Cargo.toml as `[workspace.lints.*]` once MSRV is abve 1.64
34-
# replace it with `[lints] workspace=true`
35-
#
32+
# FIXME(msrv): These should be moved to the root Cargo.toml as `[workspace.lints.*]`
33+
# once MSRV is above 1.64 and replaced with `[lints] workspace=true`
3634

3735
[lints.rust]
38-
# TODO: make ident usage consistent in each file
36+
# FIXME(cleanup): make ident usage consistent in each file
3937
unused_qualifications = "allow"
4038

4139
[lints.clippy]
42-
# TODO: fix these, and enable pedantic lints with needed exceptions
40+
# FIXME(clippy): fix these
4341
match_like_matches_macro = "allow"
4442
eq_op = "allow"

ctest/Cargo.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ cc = "1.0.1"
1414
rustc_version = "0.4"
1515
indoc = "2.0.6"
1616

17-
#
18-
# TODO: These should be moved to the root Cargo.toml as `[workspace.lints.*]` once MSRV is abve 1.64
19-
# replace it with `[lints] workspace=true`
20-
#
17+
# FIXME(msrv): These should be moved to the root Cargo.toml as `[workspace.lints.*]`
18+
# once MSRV is above 1.64 and replaced with `[lints] workspace=true`
2119

2220
[lints.rust]
23-
# TODO: make ident usage consistent in each file
21+
# FIXME(cleanup): make ident usage consistent in each file
2422
unused_qualifications = "allow"
2523

2624
[lints.clippy]
27-
# TODO: fix these, and enable pedantic lints with needed exceptions
25+
# FIXME(clippy): fix these
2826
doc_lazy_continuation = "allow"
2927
if_same_then_else = "allow"
3028
needless_borrow = "allow"

libc-test/Cargo.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,15 @@ name = "style_tests"
103103
path = "test/style_tests.rs"
104104
harness = true
105105

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

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

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

0 commit comments

Comments
 (0)