Alex Macleod
737d3b3363
Remove some unused #![feature]s
2025-05-06 14:07:39 +00: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
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
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
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 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
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
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
7e9abb311d
Merge commit ' 371120bdbf' into clippyup
2023-05-05 17:45:49 +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
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
flip1995
cd0bb7de01
Merge commit ' 4f142aa105' into clippyup
2022-10-23 15:18:45 +02:00
Philipp Krones
d75b25faab
Merge commit ' ac0e10aa68' into clippyup
2022-10-06 09:44:38 +02:00
Philipp Krones
7d4daaa8fa
Merge commit ' fdb84cbfd2' into clippyup
2022-07-18 09:39:37 +02:00
flip1995
f8f9d01c2a
Merge commit ' d7b5cbf065' into clippyup
2022-06-16 17:39:06 +02:00
Philipp Krones
f067783461
Merge commit ' d9ddce8a22' into clippyup
2022-06-04 13:34:07 +02:00
xFrednet
4587b6628d
Merge 'rust-clippy/master' into clippyup
2022-05-21 13:24:00 +02:00
flip1995
7cd86aa1be
Merge commit ' 7c21f91b15' into clippyup
2022-05-05 15:12:52 +01:00
flip1995
fb0142ae41
Merge commit ' 97a5daa659' into clippyup
2022-01-13 13:18:19 +01:00
flip1995
ece0946d7f
Merge commit ' 23d11428de' into clippyup
2021-12-17 13:40:22 +01:00
flip1995
8fea1d94f3
Merge commit ' a5d597637d' into clippyup
2021-12-06 12:33:31 +01:00
flip1995
23d5457e6d
Merge commit ' cb7915b00c' into clippyup
2021-09-28 18:03:12 +01:00