Commit graph

73 commits

Author SHA1 Message Date
Samuel Tardieu
d81396b7d0 Do not build tokio-rustls in the CI for the time being
A discrepancy between the `cmake` version available on the runners and
the one required by the `aws-lc-sys` dependency prevents the crate from
buiding.
2025-04-01 19:34:15 +02:00
Samuel Tardieu
79c69112dc Apply collapsible_if to Clippy itself
Since Clippy uses the `let_chains` feature, there are many occasions to
collapse `if` and `if let` statements.
2025-03-27 14:40:44 +01:00
dswij
4517b4260f
Fix various typos in lint messages, descriptions and comments (#14459)
changelog: none
2025-03-26 05:05:21 +00:00
Samuel Tardieu
6509de3bfb Fix situations identified by collapsible_if new hits 2025-03-25 19:50:24 +01:00
Samuel Tardieu
621911a677 Fix various typos in lint messages, descriptions and comments 2025-03-24 16:04:32 +01:00
Alex Macleod
c033a4c741
Document and improve (a lot) lintcheck --perf (#14194)
In #14116 we added a benchmarking option for Lintcheck, this commit adds
a new chapter to the book AND improves that option into a more usable
state.

It's recommended to review one commit at a time.

- **Document how to benchmark with lintcheck --perf**
- **Several improvements on lintcheck perf (desc.)**

    - Now lintcheck perf deletes target directory after benchmarking,
benchmarking with a cache isn't very useful or telling of any
precise outcome.

    - Support for benchmarking several times without having to do
a cargo clean.

    - Compress perf.data

changelog: none
2025-03-23 00:01:53 +00:00
Philipp Krones
d5a6688092
Use a lintcheck specific Clippy configuration file in the CI (#14233)
By default, lintcheck will use the `clippy.toml` file found at the
toplevel of the repository (`CARGO_MANIFEST_DIR`). This file is meant
for configuration of Clippy applied to Clippy sources.

This creates a new `lintcheck/ci-config/clippy.toml` file which is used
by the CI when running lintcheck. By default this uses the default
Clippy configuration.

changelog: none
2025-03-22 12:23:32 +00:00
blyxyas
17351bd503 Change frequency to 3000 2025-03-15 17:57:10 +01:00
Turtel216
184feee826 Fix key function description 2025-03-09 16:29:07 +02:00
Turtel216
8dd65e4098 Add documentation to json.rs module 2025-03-09 16:03:12 +02:00
Samuel Tardieu
e1d6f1fc5c Use a lintcheck specific Clippy configuration file in the CI
By default, lintcheck will use the `clippy.toml` file found at the
toplevel of the repository (`CARGO_MANIFEST_DIR`). This file is meant
for configuration of Clippy applied to Clippy sources.

This creates a new `lintcheck/ci-config/clippy.toml` file which is used
by the CI when running lintcheck. By default this uses the default
Clippy configuration.
2025-02-27 22:27:00 +01:00
Alejandra González
b583568e72
Add unnecessary_debug_formatting lint (#13893)
Fixes #12674, i.e., adds a lint to flag `Path`s printed with `{:?}`.

Nits are welcome.

changelog: Add `unnecessary_debug_formatting` lint
2025-02-26 15:03:57 +00:00
Samuel Moelius
6af901c51e Add unnecessary_debug_formatting lint
Address review comments

Fix adjacent code

Required now that the lint is pedantic

Add inline formatting tests

Add note re formatting changes

Address `unnecessary_map_or` warnings

Address additional review comments

Typo

Update Clippy version
2025-02-26 14:25:58 +00:00
blyxyas
0ee39a2015 Several improvements on lintcheck perf (desc.)
- Now lintcheck perf deletes target directory after benchmarking,
benchmarking with a cache isn't very useful or telling of any
precise outcome.

- Support for benchmarking several times without having to do
a cargo clean. Now we can benchmark a PR and master (or a single
change in the same commit) without having to move the perf.data files
into an external directory.

- Compress perf.data to allow for allowing multiple stacks and
occupy much less space
2025-02-10 23:44:47 +01:00
blyxyas
48ae7ec894 Adress review comments 2025-01-31 16:12:28 +01:00
blyxyas
fc00cdcf28 Actually make --perf imply -j=1, review comments 2025-01-30 21:04:50 +01:00
blyxyas
d49b1ffdab Implement --perf flag to lintcheck for benchmarking
Turns out I was completely overcomplicating myself,
there was no need for an external tool such as becnhv2
or even the original becnh, we already had the benchmarking
infrastructure right under our noses!

This PR implements a new **lintcheck** option called
--perf, using it as a flag will mean that lintcheck
builds Clippy as a release package and hooks perf to it.

The realization that lintcheck is already 90% of what
a benchmarking tool needs came to me in a dream.
2025-01-30 19:45:23 +01:00
Samuel Tardieu
3a7f50f6d3 Apply unnecessary_semicolon to Clippy sources 2025-01-19 15:34:07 +01:00
Samuel Tardieu
a4805ff610 Select edition 2024 2025-01-13 16:55:42 +01:00
Samuel Moelius
8a38bcc390 Make "all fields are shorthand" requirement configurable
Handle field attributes in suggestions

Fix adjacent code

Address review comments

https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1861352124

Address all review comments but one

This comment is not yet addressed: https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1874544907

`initializer_suggestions` -> `lint_inconsistent_struct_field_initializers`
2024-12-26 19:36:58 -05:00
Guillaume Gomez
cfc6444f84 Limit literal_string_with_formatting_args to known variables if no formatting argument is passed 2024-11-22 14:58:59 +01:00
Guillaume Gomez
8d5a4e95e3 Allow literal_string_with_formatting_arg in some clippy crates 2024-11-22 14:57:20 +01:00
Samuel Tardieu
36c31db705 Apply updated needless_raw_strings to Clippy sources 2024-10-07 18:29:25 +02:00
Samuel Tardieu
9dd6820edd lintcheck: bump futures* crates to 0.3.31
Version 0.3.30 doesn't compile with our nightly version.
2024-10-05 19:04:45 +02:00
Yuri Astrakhan
f7d5d9d892 Convert &Option<T> to Option<&T> 2024-09-28 19:51:02 -04:00
Philipp Krones
3ab1da8bab
Formatting 2024-09-22 20:52:15 +02:00
Jason Newcomb
173d5a6af0 Merge commit '0f8eabd623' into clippyup 2024-08-24 18:33:44 -04:00
Philipp Krones
1ac76a2062 Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
Philipp Krones
4e6851e50b Merge commit '37f4fbb929' into clippy-subtree-update 2024-07-25 18:29:17 +02:00
Philipp Krones
c1fd25d0aa Merge commit 'b794b8e08c' into clippy-subtree-update 2024-07-11 15:44:03 +02:00
Philipp Krones
abdd057163 Merge commit '68a799aea9' into clippy-subtree-update 2024-06-27 18:56:04 +02:00
Philipp Krones
3bff119f63 Merge commit '3e5a02b13b' into clippy-subtree-update 2024-06-13 12:30:48 +02:00
Philipp Krones
4363278c73 Merge commit '2efebd2f0c' into clippy-subtree-update 2024-05-21 10:39:30 -07:00
Markus Reiter
d32629891a Use generic NonZero. 2024-05-08 21:37:55 +02:00
Philipp Krones
a5aaf33422 Merge commit 'ca3b393750' into clippy-subtree-update 2024-04-18 17:48:52 +02:00
Philipp Krones
0ae4a048c6 Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
Philipp Krones
7be6e2178e Merge commit '10136170fe' into clippy-subtree-update 2024-02-27 15:50:17 +01:00
Philipp Krones
3596d44988 Merge commit 'a859e5cc1c' into clippyup 2023-12-16 14:12:50 +01:00
Philipp Krones
c9a43b18f1 Merge commit 'f0cdee4a3f' into clippy-subtree-sync 2023-12-01 18:21:58 +01:00
Philipp Krones
77c1e3aaa1 Merge commit '09ac14c901' into clippyup 2023-11-02 17:35:56 +01:00
Philipp Krones
d6d530fd0b Merge commit 'd9c24d1b1e' into clippyup 2023-07-17 10:22:32 +02:00
Philipp Krones
cb3ecf7b79 Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
Philipp Krones
e6dc0efc00 Merge commit '30448e8cf9' into clippyup 2023-06-02 11:41:57 +02:00
Philipp Krones
7e9abb311d Merge commit '371120bdbf' into clippyup 2023-05-05 17:45:49 +02:00
Philipp Krones
6b95029f17 Merge commit '83e42a2337' into clippyup 2023-04-11 15:31:08 +02:00
Philipp Krones
cf8a67d9ad Merge commit '3c06e0b1ce' into clippyup 2023-03-10 10:53:50 +01:00
Jason Newcomb
0413fb35ba Merge commit '149392b0ba' into clippyup 2023-02-25 19:28:50 -05:00
Philipp Krones
e7fe1f9c14 Merge commit '0f7558148c' into clippyup 2023-02-10 14:01:19 +01:00
Philipp Krones
d05e2865a0 Merge commit 'd822110d3b' into clippyup 2022-12-01 18:29:38 +01:00
Philipp Krones
46c5a5d234 Merge commit 'f4850f7292' into clippyup 2022-11-21 20:51:52 +01:00