|
30 | 30 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant" |
31 | 31 | }, |
32 | 32 | { |
33 | | - "key": "clippy::arithmetic", |
34 | | - "name": "Checks for any kind of arithmetic operation of any type. Operators like `+`, `-`, `*` or `<<` are u", |
35 | | - "url": "https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic" |
| 33 | + "key": "clippy::arithmetic_side_effects", |
| 34 | + "name": "Checks any kind of arithmetic operation of any type. Operators like `+`, `-`, `*` or `<<` are usual", |
| 35 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects" |
36 | 36 | }, |
37 | 37 | { |
38 | 38 | "key": "clippy::as_conversions", |
39 | 39 | "name": "Checks for usage of `as` conversions. Note that this lint is specialized in linting *every single*", |
40 | 40 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#as_conversions" |
41 | 41 | }, |
| 42 | + { |
| 43 | + "key": "clippy::as_ptr_cast_mut", |
| 44 | + "name": "Checks for the result of a `&self`-taking `as_ptr` being cast to a mutable pointer", |
| 45 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#as_ptr_cast_mut" |
| 46 | + }, |
42 | 47 | { |
43 | 48 | "key": "clippy::as_underscore", |
44 | 49 | "name": "Check for the usage of `as _` conversion using inferred type.", |
|
109 | 114 | "name": "Checks for expressions of the form `x == true`, `x != true` and order comparisons such as `x < true`", |
110 | 115 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison" |
111 | 116 | }, |
| 117 | + { |
| 118 | + "key": "clippy::bool_to_int_with_if", |
| 119 | + "name": "Instead of using an if statement to convert a bool to an int, this lint suggests using a `from()` fu", |
| 120 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#bool_to_int_with_if" |
| 121 | + }, |
112 | 122 | { |
113 | 123 | "key": "clippy::borrow_as_ptr", |
114 | 124 | "name": "Checks for the usage of `&expr as *const T` or `&mut expr as *mut T`, and suggest using `ptr::addr_o", |
|
134 | 144 | "name": "Checks for use of `Box<T>` where T is a collection such as Vec anywhere in the code. Check the [Box", |
135 | 145 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#box_collection" |
136 | 146 | }, |
| 147 | + { |
| 148 | + "key": "clippy::box_default", |
| 149 | + "name": "checks for `Box::new(T::default())`, which is better written as `Box::<T>::default()`.", |
| 150 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#box_default" |
| 151 | + }, |
137 | 152 | { |
138 | 153 | "key": "clippy::boxed_local", |
139 | 154 | "name": "Checks for usage of `Box<T>` where an unboxed `T` would work fine.", |
|
189 | 204 | "name": "Checks for casts between numerical types that may be replaced by safe conversion functions.", |
190 | 205 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless" |
191 | 206 | }, |
| 207 | + { |
| 208 | + "key": "clippy::cast_nan_to_int", |
| 209 | + "name": "Checks for a known NaN float being cast to an integer", |
| 210 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#cast_nan_to_int" |
| 211 | + }, |
192 | 212 | { |
193 | 213 | "key": "clippy::cast_possible_truncation", |
194 | 214 | "name": "Checks for casts between numerical types that may truncate large values. This is expected behavior,", |
|
224 | 244 | "name": "Checks for `as` casts between raw pointers to slices with differently sized elements.", |
225 | 245 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_different_sizes" |
226 | 246 | }, |
| 247 | + { |
| 248 | + "key": "clippy::cast_slice_from_raw_parts", |
| 249 | + "name": "Checks for a raw slice being cast to a slice pointer", |
| 250 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_from_raw_parts" |
| 251 | + }, |
227 | 252 | { |
228 | 253 | "key": "clippy::char_lit_as_u8", |
229 | 254 | "name": "Checks for expressions where a character literal is cast to `u8` and suggests using a byte literal i", |
|
299 | 324 | "name": "Finds nested `match` or `if let` expressions where the patterns may be \"collapsed\" together without", |
300 | 325 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match" |
301 | 326 | }, |
| 327 | + { |
| 328 | + "key": "clippy::collapsible_str_replace", |
| 329 | + "name": "Checks for consecutive calls to `str::replace` (2 or more) that can be collapsed into a single call.", |
| 330 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace" |
| 331 | + }, |
302 | 332 | { |
303 | 333 | "key": "clippy::comparison_chain", |
304 | 334 | "name": "Checks comparison chains written with `if` that can be rewritten with `match` and `cmp`.", |
|
409 | 439 | "name": "Checks for types that derive `PartialEq` and could implement `Eq`.", |
410 | 440 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq" |
411 | 441 | }, |
| 442 | + { |
| 443 | + "key": "clippy::disallowed_macros", |
| 444 | + "name": "Denies the configured macros in clippy.toml Note: Even though this lint is warn-by-default, it will", |
| 445 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros" |
| 446 | + }, |
412 | 447 | { |
413 | 448 | "key": "clippy::disallowed_methods", |
414 | 449 | "name": "Denies the configured methods and functions in clippy.toml Note: Even though this lint is warn-by-d", |
|
724 | 759 | "name": "Checks for iterating a map (`HashMap` or `BTreeMap`) and ignoring either the keys or values.", |
725 | 760 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map" |
726 | 761 | }, |
727 | | - { |
728 | | - "key": "clippy::for_loops_over_fallibles", |
729 | | - "name": "Checks for `for` loops over `Option` or `Result` values.", |
730 | | - "url": "https://rust-lang.github.io/rust-clippy/master/index.html#for_loops_over_fallibles" |
731 | | - }, |
732 | 762 | { |
733 | 763 | "key": "clippy::forget_copy", |
734 | 764 | "name": "Checks for calls to `std::mem::forget` with a value that derives the Copy trait", |
|
834 | 864 | "name": "Checks for missing return statements at the end of a block.", |
835 | 865 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return" |
836 | 866 | }, |
| 867 | + { |
| 868 | + "key": "clippy::implicit_saturating_add", |
| 869 | + "name": "Checks for implicit saturating addition.", |
| 870 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_add" |
| 871 | + }, |
837 | 872 | { |
838 | 873 | "key": "clippy::implicit_saturating_sub", |
839 | 874 | "name": "Checks for implicit saturating subtraction.", |
|
989 | 1024 | "name": "Checks for the use of `.iter().count()`.", |
990 | 1025 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#iter_count" |
991 | 1026 | }, |
| 1027 | + { |
| 1028 | + "key": "clippy::iter_kv_map", |
| 1029 | + "name": "Checks for iterating a map (`HashMap` or `BTreeMap`) and ignoring either the keys or values.", |
| 1030 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map" |
| 1031 | + }, |
992 | 1032 | { |
993 | 1033 | "key": "clippy::iter_next_loop", |
994 | 1034 | "name": "Checks for loops on `x.next()`.", |
|
1150 | 1190 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits" |
1151 | 1191 | }, |
1152 | 1192 | { |
1153 | | - "key": "clippy::manual_empty_string_creations", |
1154 | | - "name": "Checks for usage of `\"\"` to create a `String`, such as `\"\".to_string()`, `\"\".to_owned()`, `String::", |
1155 | | - "url": "https://rust-lang.github.io/rust-clippy/master/index.html#manual_empty_string_creations" |
| 1193 | + "key": "clippy::manual_clamp", |
| 1194 | + "name": "Identifies good opportunities for a clamp function from std or core, and suggests using it.", |
| 1195 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp" |
| 1196 | + }, |
| 1197 | + { |
| 1198 | + "key": "clippy::manual_filter", |
| 1199 | + "name": "Checks for usages of `match` which could be implemented using `filter`", |
| 1200 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter" |
1156 | 1201 | }, |
1157 | 1202 | { |
1158 | 1203 | "key": "clippy::manual_filter_map", |
|
1229 | 1274 | "name": "Checks for manual implementations of `str::repeat`", |
1230 | 1275 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat" |
1231 | 1276 | }, |
| 1277 | + { |
| 1278 | + "key": "clippy::manual_string_new", |
| 1279 | + "name": "Checks for usage of `\"\"` to create a `String`, such as `\"\".to_string()`, `\"\".to_owned()`, `String::", |
| 1280 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new" |
| 1281 | + }, |
1232 | 1282 | { |
1233 | 1283 | "key": "clippy::manual_strip", |
1234 | 1284 | "name": "Suggests using `strip_{prefix,suffix}` over `str::{starts,ends}_with` and slicing using the pattern'", |
|
1429 | 1479 | "name": "Check for empty spin loops", |
1430 | 1480 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#missing_spin_loop" |
1431 | 1481 | }, |
| 1482 | + { |
| 1483 | + "key": "clippy::missing_trait_methods", |
| 1484 | + "name": "Checks if a provided method is used implicitly by a trait implementation. A usage example would be a", |
| 1485 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#missing_trait_methods" |
| 1486 | + }, |
1432 | 1487 | { |
1433 | 1488 | "key": "clippy::mistyped_literal_suffixes", |
1434 | 1489 | "name": "Warns for mistyped suffix in literals", |
|
1469 | 1524 | "name": "Checks for getting the remainder of a division by one or minus one.", |
1470 | 1525 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#modulo_one" |
1471 | 1526 | }, |
| 1527 | + { |
| 1528 | + "key": "clippy::multi_assignments", |
| 1529 | + "name": "Checks for nested assignments.", |
| 1530 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#multi_assignments" |
| 1531 | + }, |
1472 | 1532 | { |
1473 | 1533 | "key": "clippy::multiple_crate_versions", |
1474 | 1534 | "name": "Checks to see if multiple versions of a crate are being used.", |
|
1551 | 1611 | }, |
1552 | 1612 | { |
1553 | 1613 | "key": "clippy::needless_borrowed_reference", |
1554 | | - "name": "Checks for bindings that destructure a reference and borrow the inner value with `&ref`.", |
| 1614 | + "name": "Checks for bindings that needlessly destructure a reference and borrow the inner value with `&ref`.", |
1555 | 1615 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference" |
1556 | 1616 | }, |
1557 | 1617 | { |
|
1756 | 1816 | }, |
1757 | 1817 | { |
1758 | 1818 | "key": "clippy::option_if_let_else", |
1759 | | - "name": "Lints usage of `if let Some(v) = ... { y } else { x }` which is more idiomatically done with `Option", |
| 1819 | + "name": "Lints usage of `if let Some(v) = ... { y } else { x }` and `match .. { Some(v) => y, None/_ => x }`", |
1760 | 1820 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else" |
1761 | 1821 | }, |
1762 | 1822 | { |
|
1776 | 1836 | }, |
1777 | 1837 | { |
1778 | 1838 | "key": "clippy::or_fun_call", |
1779 | | - "name": "Checks for calls to `.or(foo(..))`, `.unwrap_or(foo(..))`, etc., and suggests to use `or_else`, `unw", |
| 1839 | + "name": "Checks for calls to `.or(foo(..))`, `.unwrap_or(foo(..))`, `.or_insert(foo(..))` etc., and suggests", |
1780 | 1840 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call" |
1781 | 1841 | }, |
1782 | 1842 | { |
|
1814 | 1874 | "name": "Checks for calls of `unwrap[_err]()` that will always fail.", |
1815 | 1875 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#panicking_unwrap" |
1816 | 1876 | }, |
| 1877 | + { |
| 1878 | + "key": "clippy::partial_pub_fields", |
| 1879 | + "name": "Checks whether partial fields of a struct are public. Either make all fields of a type public, or m", |
| 1880 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#partial_pub_fields" |
| 1881 | + }, |
1817 | 1882 | { |
1818 | 1883 | "key": "clippy::partialeq_ne_impl", |
1819 | 1884 | "name": "Checks for manual re-implementations of `PartialEq::ne`.", |
|
1834 | 1899 | "name": "Checks for patterns that aren't exact representations of the types they are applied to. To satisfy", |
1835 | 1900 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch" |
1836 | 1901 | }, |
1837 | | - { |
1838 | | - "key": "clippy::positional_named_format_parameters", |
1839 | | - "name": "This lint warns when a named parameter in a format string is used as a positional one.", |
1840 | | - "url": "https://rust-lang.github.io/rust-clippy/master/index.html#positional_named_format_parameters" |
1841 | | - }, |
1842 | 1902 | { |
1843 | 1903 | "key": "clippy::possible_missing_comma", |
1844 | 1904 | "name": "Checks for possible missing comma in an array. It lints if an array element is a binary operator exp", |
|
2034 | 2094 | "name": "Checks for unnecessary '..' pattern binding on struct when all fields are explicitly matched.", |
2035 | 2095 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#rest_pat_in_fully_bound_structs" |
2036 | 2096 | }, |
| 2097 | + { |
| 2098 | + "key": "clippy::result_large_err", |
| 2099 | + "name": "Checks for functions that return `Result` with an unusually large `Err`-variant.", |
| 2100 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err" |
| 2101 | + }, |
2037 | 2102 | { |
2038 | 2103 | "key": "clippy::result_map_or_into_option", |
2039 | 2104 | "name": "Checks for usage of `_.map_or(None, Some)`.", |
|
2141 | 2206 | }, |
2142 | 2207 | { |
2143 | 2208 | "key": "clippy::similar_names", |
2144 | | - "name": "Checks for names that are very similar and thus confusing.", |
| 2209 | + "name": "Checks for names that are very similar and thus confusing. Note: this lint looks for similar names", |
2145 | 2210 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#similar_names" |
2146 | 2211 | }, |
2147 | 2212 | { |
|
2299 | 2364 | "name": "Checks for calls to [`splitn`] (https://doc.rust-lang.org/std/primitive.str.html#method.splitn) and", |
2300 | 2365 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_splitn" |
2301 | 2366 | }, |
| 2367 | + { |
| 2368 | + "key": "clippy::suspicious_to_owned", |
| 2369 | + "name": "Checks for the usage of `_.to_owned()`, on a `Cow<'_, _>`.", |
| 2370 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned" |
| 2371 | + }, |
2302 | 2372 | { |
2303 | 2373 | "key": "clippy::suspicious_unary_op_formatting", |
2304 | 2374 | "name": "Checks the formatting of a unary operator on the right hand side of a binary operator. It lints if t", |
|
2474 | 2544 | "name": "Checks for `set_len()` call that creates `Vec` with uninitialized elements. This is commonly caused", |
2475 | 2545 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#uninit_vec" |
2476 | 2546 | }, |
| 2547 | + { |
| 2548 | + "key": "clippy::uninlined_format_args", |
| 2549 | + "name": "Detect when a variable is not inlined in a format string, and suggests to inline it.", |
| 2550 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args" |
| 2551 | + }, |
2477 | 2552 | { |
2478 | 2553 | "key": "clippy::unit_arg", |
2479 | 2554 | "name": "Checks for passing a unit value as an argument to a function without using a unit literal (`()`).", |
|
2614 | 2689 | "name": "Checks for functions that are declared `async` but have no `.await`s inside of them.", |
2615 | 2690 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#unused_async" |
2616 | 2691 | }, |
| 2692 | + { |
| 2693 | + "key": "clippy::unused_format_specs", |
| 2694 | + "name": "Detects [formatting parameters] that have no effect on the output of `format!()`, `println!()` or si", |
| 2695 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#unused_format_specs" |
| 2696 | + }, |
2617 | 2697 | { |
2618 | 2698 | "key": "clippy::unused_io_amount", |
2619 | 2699 | "name": "Checks for unused written/read amount.", |
2620 | 2700 | "url": "https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount" |
2621 | 2701 | }, |
| 2702 | + { |
| 2703 | + "key": "clippy::unused_peekable", |
| 2704 | + "name": "Checks for the creation of a `peekable` iterator that is never `.peek()`ed", |
| 2705 | + "url": "https://rust-lang.github.io/rust-clippy/master/index.html#unused_peekable" |
| 2706 | + }, |
2622 | 2707 | { |
2623 | 2708 | "key": "clippy::unused_rounding", |
2624 | 2709 | "name": "Detects cases where a whole-number literal float is being rounded, using the `floor`, `ceil`, or `r", |
|
0 commit comments