Timo
781fdab9a9
Move internal lints to their own crate ( #13223 )
...
This makes it so switching the internal feature on/off no longer
rebuilds `clippy_lints`.
r? @flip1995
changelog: none
2025-04-18 12:04:08 +00:00
Philipp Krones
de90fa42dd
Merge remote-tracking branch 'upstream/master' into rustup
2025-04-17 18:36:59 +02:00
Jason Newcomb
5b4b463d49
Move internal lints to their own crate
2025-04-12 17:53:36 -04: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
lapla-cogito
19c7c46d48
rename rust-toolchain to rust-toolchain.toml
2025-03-21 09:37:59 +09:00
Philipp Krones
fe01c44995
Merge commit '9f9a822509e5ad3e560cbbe830d1013f936fca28' into clippy-subtree-update
2025-02-28 23:27:09 +01:00
Alex Macleod
0972c3b565
Check for MSRV attributes in late passes using the HIR
2025-02-28 18:09:44 +00:00
Andre Bogus
6366cca439
add io_other_error lint
2025-02-21 22:08:31 +01:00
Philipp Krones
735bed7aa5
Add cargo dev setup toolchain --standalone ( #14230 )
...
Allows creating a toolchain that's independent of the local build, for
example to make two separate toolchains with slight differences without
requiring two checkouts of clippy
changelog: none
2025-02-17 10:18:16 +00:00
Alex Macleod
058ae80a55
Add cargo dev setup toolchain --standalone
2025-02-16 14:43:18 +00:00
Samuel Tardieu
6dd477ad5a
Add --allow-no-vcs to cargo dev dogfood --fix
...
Some developers might prefer to use alternate VCS, such as Jujutsu, which
are not detected by `cargo fix`. This forwards the `--allow-no-vcs`
command line argument to `cargo fix`.
2025-02-16 13:06:03 +01:00
Michael Howell
ac15a10b55
just_underscores_and_digits: ignore empty ident
...
Empty idents come from error recovery, and should imply that a
better error has already been emitted.
2025-02-11 09:35:43 -07:00
Samuel Tardieu
0e42ba908c
Permit specifying a non-default edition when linting file
...
`cargo dev lint /tmp/file.rs -- --edition 2021` will select edition
2021.
2025-02-07 00:21:49 +01:00
Samuel Tardieu
8a9d55012d
Use edition 2024 when running cargo dev lint
2025-02-06 18:59:33 +01:00
Philipp Krones
5aa9d7ae7f
Merge commit '3e3715c31236bff56f1c63a1de2c7bbdfcfb0923' into clippy-subtree-update
2025-02-06 15:00:24 +01:00
Philipp Krones
f549562b81
Merge remote-tracking branch 'upstream/master' into rustup
2025-02-06 14:31:01 +01:00
Catherine Flores
e02c8857e8
Move format_push_string and format_collect to pedantic ( #13894 )
...
Closes #11434 by moving `format_push_string` and `format_collect` to
pedantic.
changelog: Move `format_push_string` and `format_collect` to pedantic
2025-01-28 19:32:24 +00:00
Philipp Krones
9da9ddb7db
Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into clippy-subtree-update
2025-01-28 19:33:54 +01:00
Kalle Wachsmuth
25a77cf4f4
remove clippy::double_neg
2025-01-26 12:15:12 +01:00
Samuel Tardieu
3a7f50f6d3
Apply unnecessary_semicolon to Clippy sources
2025-01-19 15:34:07 +01:00
Samuel Moelius
87f7e21009
Address review comments
2025-01-14 06:06:06 -05:00
Samuel Tardieu
a4805ff610
Select edition 2024
2025-01-13 16:55:42 +01:00
Philipp Krones
d0a74af979
Merge commit '19e305bb57a7595f2a8d81f521c0dd8bf854e739' into clippy-subtree-update
2025-01-09 18:57:00 +01:00
Samuel Moelius
a7adb8217e
Move format_push_string and format_collect to pedantic
2024-12-29 07:44:06 -05: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
Philipp Krones
d58b911e01
Merge commit 'ff4a26d442bead94a4c96fb1de967374bc4fbd8e' into clippy-subtree-update
2024-11-28 19:38:59 +01:00
Philipp Krones
93d5ccdba7
Add cargo dev release subcommand
...
Currently this only provides the feature to auto-update the versions in the
`Cargo.toml` files. With the move to Josh, a command to get beta and stable
release commits will be added.
2024-11-19 17:59:33 +01:00
Philipp Krones
66715532ab
Add cargo dev sync subcommand
...
Currently this only provides the feature to auto-update the nightly version in
the `rust-toolchain` file and the `clippy_utils/README.md` file. The actual sync
to and from the Rust repo will be added with the move to Josh.
2024-11-19 17:59:33 +01:00
Philipp Krones
9c8d9504ce
Introduce utils mod in clippy_dev
...
There was some dependence between the different subcommands of clippy_dev. And
this dependence will increased with the introduction of the sync and release
subcommands. This moves the common functions to a `utils` module, to decouple
the other modules.
2024-11-18 10:04:27 +01:00
Philipp Krones
5c1811ab94
Rename all clippy_config::msrvs -> clippy_utils::msrvs
2024-11-15 19:38:09 +01:00
Philipp Krones
1ceaa90413
Merge commit '786fbd6d683933cd0e567fdcd25d449a69b4320c' into clippy-subtree-update
2024-11-14 19:35:26 +01:00
Jacherr
89210d7c5a
new lint unnecessary_map_or
2024-11-12 23:00:26 +00:00
Philipp Krones
6ced8c33c0
Merge commit 'f712eb5cdccd121d0569af12f20e6a0fabe4364d' into clippy-subtree-update
2024-11-07 22:37:01 +01:00
Philipp Krones
b27570b19b
Fix cargo dev update_lints
...
Now that lints can add @eval_always at the end of their definition, the lint
declaration might not end right after the description. The `update_lints`
command can skip everything that comes after that.
2024-11-07 17:27:46 +01:00
Alex Macleod
a7aa8bfde0
Watch tests/compile-test.rs in cargo dev serve
2024-10-30 19:21:25 +00:00
Philipp Krones
fea5e77da1
Merge commit 'a109190d7060236e655fc75533373fa274ec5343' into clippy-subtree-update
2024-10-18 13:44:06 +02:00
klensy
590fdfba14
bump opener to sync with rust
2024-10-15 17:51:35 +03:00
bors
6f1def79dd
Auto merge of #13269 - GuillaumeGomez:rewrite-lints-page, r=Alexendoo
...
Rewrite lints page
This PR has multiple goals:
* Make lints page to work without needing a web server by removing the json file.
* Prepare the field to also make the page work with JS (not done in this PR but should be straightforward).
* Remove angular dependency.
r? `@Alexendoo`
changelog: make lint page work without web server
2024-10-11 14:18:54 +00:00
Samuel Tardieu
36c31db705
Apply updated needless_raw_strings to Clippy sources
2024-10-07 18:29:25 +02:00
Philipp Krones
b61fcbee76
Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into clippy-subtree-update
2024-09-24 11:58:04 +02:00
Guillaume Gomez
9661ba0740
Update cargo dev serve command to look over the correct files
2024-09-22 22:30:45 +02:00
Guillaume Gomez
b522e7a944
Generate lint list in HTML directly instead of JS
2024-09-22 22:30:44 +02:00
Philipp Krones
3ab1da8bab
Formatting
2024-09-22 20:52:15 +02:00
y21
e8ac4ea418
new lint: zombie_processes
2024-08-27 21:51:02 +02:00
Jason Newcomb
173d5a6af0
Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyup
2024-08-24 18:33:44 -04:00
Jason Newcomb
e348fe2233
Merge branch 'master' into rustup
2024-08-24 16:31:01 -04:00
Nicholas Nethercote
f72b3dbba2
Use impl PartialEq<TokenKind> for Token more.
...
This lets us compare a `Token` with a `TokenKind`. It's used a lot, but
can be used even more, avoiding the need for some `.kind` uses.
2024-08-14 16:37:09 +10:00
Alex Macleod
182cd5f278
Replace the metadata collector with tests
2024-08-12 20:24:46 +00:00
Philipp Krones
1ac76a2062
Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into clippy-subtree-update
2024-08-08 19:13:50 +02:00
bors
5ead90f13a
Auto merge of #12150 - ithinuel:add_misleading_use_of_ok, r=y21
...
Add lint for `unused_result_ok`
This PR adds a lint to capture the use of `expr.ok();` when the result is not _really_ used.
This could be interpreted as the result being checked (like it is with `unwrap()` or `expect`) but
it actually only ignores the result.
`let _ = expr;` expresses that intent better.
This was also mentionned in #8994 (although not being the main topic of that issue).
changelog: [`misleading_use_of_ok`]: Add new lint to capture `.ok();` when the result is not _really_ used.
2024-08-06 19:01:41 +00:00