Skip to content

Commit 6100116

Browse files
committed
Tune lints for 1.66 Rust
1 parent 64721b3 commit 6100116

File tree

3 files changed

+27
-20
lines changed

3 files changed

+27
-20
lines changed

.clippy.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ standard-macro-braces = [
66
{ name = "assert", brace = "(" },
77
{ name = "assert_eq", brace = "(" },
88
{ name = "assert_ne", brace = "(" },
9+
{ name = "debug_assert", brace = "(" },
10+
{ name = "debug_assert_eq", brace = "(" },
11+
{ name = "debug_assert_ne", brace = "(" },
12+
{ name = "format", brace = "(" },
13+
{ name = "format_args", brace = "(" },
914
{ name = "matches", brace = "(" },
15+
{ name = "panic", brace = "(" },
16+
{ name = "print", brace = "(" },
17+
{ name = "println", brace = "(" },
1018
{ name = "vec", brace = "[" },
19+
{ name = "write", brace = "(" },
20+
{ name = "writeln", brace = "(" },
1121
]

.github/workflows/ci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,15 @@ jobs:
9494

9595
- run: cargo install cargo-fuzz
9696

97-
- name: Fuzz for 1 minute
98-
run: make cargo.fuzz target=${{ matrix.target }} time=60
97+
- run: make cargo.fuzz target=${{ matrix.target }} time=60
9998

10099
msrv:
101100
name: MSRV
102101
strategy:
103102
fail-fast: false
104103
matrix:
105104
msrv: ["1.62.0"]
106-
os:
107-
- ubuntu
108-
- macOS
109-
- windows
105+
os: ["ubuntu", "macOS", "windows"]
110106
runs-on: ${{ matrix.os }}-latest
111107
steps:
112108
- uses: actions/checkout@v3
@@ -126,14 +122,8 @@ jobs:
126122
strategy:
127123
fail-fast: false
128124
matrix:
129-
os:
130-
- ubuntu
131-
- macOS
132-
- windows
133-
toolchain:
134-
- stable
135-
- beta
136-
- nightly
125+
toolchain: ["stable", "beta", "nightly"]
126+
os: ["ubuntu", "macOS", "windows"]
137127
runs-on: ${{ matrix.os }}-latest
138128
steps:
139129
- uses: actions/checkout@v3
@@ -166,6 +156,8 @@ jobs:
166156
toolchain: nightly
167157

168158
- run: make cargo.doc private=yes docsrs=yes open=no
159+
env:
160+
RUSTFLAGS: -D warnings
169161

170162

171163

@@ -174,8 +166,8 @@ jobs:
174166
# Releasing #
175167
#############
176168

177-
release-crate:
178-
name: release on crates.io
169+
publish:
170+
name: publish (crates.io)
179171
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
180172
needs: ["release-github"]
181173
runs-on: ubuntu-latest
@@ -185,12 +177,12 @@ jobs:
185177
with:
186178
toolchain: stable
187179

188-
- name: Publish `cucumber-expressions` crate
189-
run: cargo publish -p cucumber-expressions
190-
--token ${{ secrets.CRATESIO_TOKEN }}
180+
- run: cargo publish -p cucumber-expressions
181+
env:
182+
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
191183

192184
release-github:
193-
name: release on GitHub
185+
name: release (GitHub)
194186
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
195187
needs:
196188
- clippy

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#![forbid(non_ascii_idents, unsafe_code)]
2727
#![warn(
2828
clippy::as_conversions,
29+
clippy::as_ptr_cast_mut,
2930
clippy::assertions_on_result_states,
3031
clippy::branches_sharing_code,
3132
clippy::clone_on_ref_ptr,
@@ -34,6 +35,7 @@
3435
clippy::debug_assert_with_mut_call,
3536
clippy::decimal_literal_representation,
3637
clippy::default_union_representation,
38+
clippy::derive_partial_eq_without_eq,
3739
clippy::else_if_without_else,
3840
clippy::empty_drop,
3941
clippy::empty_line_after_outer_attr,
@@ -66,6 +68,7 @@
6668
clippy::nonstandard_macro_braces,
6769
clippy::option_if_let_else,
6870
clippy::panic_in_result_fn,
71+
clippy::partial_pub_fields,
6972
clippy::pedantic,
7073
clippy::print_stderr,
7174
clippy::print_stdout,
@@ -118,6 +121,8 @@
118121
unused_tuple_struct_fields,
119122
variant_size_differences
120123
)]
124+
// TODO: Remove on next `derive_more` major version.
125+
#![allow(clippy::uninlined_format_args)]
121126

122127
pub mod ast;
123128
mod combinator;

0 commit comments

Comments
 (0)