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
Guillaume Gomez
ec8c0b3755
Make annotations mandatory for internal ui tests
2025-03-12 11:32:40 +01:00
Guillaume Gomez
cfc743226e
Update ui_test version to 0.29.2
2025-03-12 11:29:54 +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
Guillaume Gomez
a50953c1b9
Disable mandatory annotations for ui-internals tests for now until we find a solution for tests/ui-internal/custom_ice_message.rs
2025-02-15 13:38:43 +01:00
Guillaume Gomez
0841f6e9dc
Don't make ui test annotations madatory for ui-cargo
2025-02-15 13:38:43 +01:00
Guillaume Gomez
95c6866dd4
Make UI tests annotations mandatory
2025-02-15 13:37:00 +01:00
Samuel Tardieu
a73166872d
In edition 2024, std::env::set_var is unsafe
2025-01-13 15:58:11 +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
da19d47147
Fix lints syntax highlighting
2024-10-18 18:03:16 +02: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
Guillaume Gomez
603934336d
Greatly reduce generated HTML page size
2024-10-03 11:17:33 +02:00
Guillaume Gomez
47f40d468a
Improve rendering speed by moving settings generation after theme rendering
2024-10-03 11:12:19 +02:00
blyxyas
13e2633f19
Also sanitize configuration
2024-10-01 19:43:19 +02:00
blyxyas
daf730caed
Add sanitize_explanation
2024-09-26 00:23:38 +02:00
Guillaume Gomez
0055cebaa3
Replace search with vanilla JS
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
Oli Scherer
1f13633359
Bump ui_test
2024-09-09 17:05:31 +02:00
Alex Macleod
182cd5f278
Replace the metadata collector with tests
2024-08-12 20:24:46 +00:00
Philipp Krones
7a73a101e9
Merge remote-tracking branch 'upstream/master' into rustup
2024-08-08 18:54:43 +02:00
Jason Newcomb
4e57b2c46f
Use -D warnings instead of deny-warnings feature.
2024-08-06 10:46:39 -04:00
Slanterns
0812732cfc
stabilize is_sorted
2024-07-28 03:11:54 +08:00
Philipp Krones
82b44345a5
Bump ui_test version -> 0.25
2024-07-26 11:40:27 +02:00
Philipp Krones
4e6851e50b
Merge commit ' 37f4fbb929' into clippy-subtree-update
2024-07-25 18:29:17 +02:00
Alex Macleod
af6d49d97c
Fix running compile-test under cargo nextest
2024-07-23 16:15:54 +00:00
Oli Scherer
3b390d416d
Bump clippy version
2024-07-15 08:51:04 +00:00
Peter Jaszkowiak
a456300af5
Stabilize LazyCell and LazyLock (lazy_cell)
2024-02-20 20:55:13 -07:00
Philipp Krones
80c6f8ff7b
Merge commit ' 20b085d500' into clippy-subtree-update
2024-05-02 17:26:44 +02:00
Philipp Krones
0ae4a048c6
Merge commit ' 9725c4a162' into clippy-subtree-update
2024-04-04 19:52:55 +02:00
Philipp Krones
7e83df4068
Merge commit ' 93f0a9a91f' into clippy-subtree-update
2024-03-07 17:19:29 +01:00
Philipp Krones
7be6e2178e
Merge commit ' 10136170fe' into clippy-subtree-update
2024-02-27 15:50:17 +01:00
Philipp Krones
77c1e3aaa1
Merge commit ' 09ac14c901' into clippyup
2023-11-02 17:35:56 +01:00
Philipp Krones
8e7d1678c4
Merge commit ' 2b030eb03d' into clippyup
2023-10-21 14:16:11 +02:00
Philipp Krones
772296c50e
Merge commit ' 7671c283a5' into clippyup
2023-09-25 11:28:58 +02:00
Philipp Krones
471469d30f
Merge commit ' 98363cbf6a' into clippyup
2023-09-12 18:44:06 +02:00
Alex Macleod
e88a556124
Reuse rustdoc's doc comment handling in Clippy
2023-09-08 23:42:57 +00:00
Oli Scherer
6a876f236c
Bump ui_test
2023-08-29 13:47:06 +00:00
Philipp Krones
cc61aeea54
Merge commit ' 080b587854' into clippyup
2023-08-24 21:32:12 +02:00
Nilstrieb
85b5e98ea2
Add internal_features lint
...
It lints against features that are inteded to be internal to the
compiler and standard library. Implements MCP #596 .
We allow `internal_features` in the standard library and compiler as those
use many features and this _is_ the standard library from the "internal to the compiler and
standard library" after all.
Marking some features as internal wasn't exactly the most scientific approach, I just marked some
mostly obvious features. While there is a categorization in the macro,
it's not very well upheld (should probably be fixed in another PR).
We always pass `-Ainternal_features` in the testsuite
About 400 UI tests and several other tests use internal features.
Instead of throwing the attribute on each one, just always allow them.
There's nothing wrong with testing internal features^^
2023-08-03 14:50:50 +02:00
Philipp Krones
b0e64a9c09
Merge commit ' 5436dba826' into clippyup
2023-07-31 23:53:53 +02:00
Trevor Gross
6ca6be6f2b
Unite bless environment variables under RUSTC_BLESS
...
Currently, Clippy, Miri, Rustfmt, and rustc all use an environment variable to
indicate that output should be blessed, but they use different variable names.
In order to improve consistency, this patch applies the following changes:
- Emit `RUSTC_BLESS` within `prepare_cargo_test` so it is always
available
- Change usage of `MIRI_BLESS` in the Miri subtree to use `RUSTC_BLESS`
- Change usage of `BLESS` in the Clippy subtree to `RUSTC_BLESS`
- Change usage of `BLESS` in the Rustfmt subtree to `RUSTC_BLESS`
- Adjust the blessable test in `rustc_errors` to use this same
convention
- Update documentation where applicable
Any tools that uses `RUSTC_BLESS` should check that it is set to any value
other than `"0"`.
2023-07-26 16:54:02 -04:00
Philipp Krones
d6d530fd0b
Merge commit ' d9c24d1b1e' into clippyup
2023-07-17 10:22:32 +02:00
Philipp Krones
4aa4fecf89
Fix compile-test tests to work with the new ui_test crate
2023-07-02 15:07:39 +02:00
Philipp Krones
cb3ecf7b79
Merge commit ' 37f4c1725d' into clippyup
2023-07-02 14:59:02 +02:00
Philipp Krones
a1b75c5108
Merge commit ' a3ed905928' into clippyup
2023-04-23 13:28:56 +02:00
Trevor Gross
4cf5bdc60c
Stabilize a portion of 'once_cell'
...
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-03-29 18:04:44 -04: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