Jason Newcomb
d8d4a135ea
Move UnnecessarySortBy into Methods lint pass
2022-08-19 10:54:55 -04:00
Jason Newcomb
bb0584dfb4
Move UnitHash into Methods lint pass
2022-08-19 10:54:55 -04:00
Jason Newcomb
e213b6ee35
Move TransmutingNull into Transmute lint pass
2022-08-19 10:54:55 -04:00
Jason Newcomb
e834855950
Move StableSortPrimitive to Methods lint pass
2022-08-19 10:54:55 -04:00
Jason Newcomb
06d752e28d
Move RepeatOnce into Methods lint pass
2022-08-19 10:54:55 -04:00
Jason Newcomb
226f135a03
Move PathBufPushOverwrite into Methods lint group
2022-08-19 10:32:31 -04:00
Jason Newcomb
0cc01cef30
Move OpenOptions into Methods lint pass
2022-08-19 10:32:16 -04:00
Jason Newcomb
508cf6bdbc
Move MutMutexLock into Methods lint pass
2022-08-19 10:32:16 -04:00
Jason Newcomb
2f0ed0a0b1
Move MapErrIgnore into Methods lint pass
2022-08-19 10:32:15 -04:00
Jason Newcomb
452395485b
Move MapClone into Methods lint pass
2022-08-19 10:31:41 -04:00
Jason Newcomb
5bc8813cdd
Move ManualOkOr into Methods lint pass
2022-08-19 10:31:41 -04:00
Jason Newcomb
a8d80d531f
Move GetFirst into Methods lint pass
2022-08-19 10:29:55 -04:00
Jason Newcomb
e3b77974d0
Move CaseSensitiveFileExtensionComparisons into Methods lint pass
2022-08-19 10:29:55 -04:00
Jason Newcomb
ba6a459528
Move BytesCountToLen into Methods lint pass
2022-08-19 10:28:59 -04:00
Jason Newcomb
2502898686
Move ByteCount into Methods lint pass
2022-08-19 10:28:59 -04:00
Jason Newcomb
21f595433e
Move BorrowAsPtr into Casts lint pass
2022-08-19 10:24:58 -04:00
Jason Newcomb
8ab2f880d0
Move AsUnderscore into Casts lint pass
2022-08-19 10:23:19 -04:00
bors
868dba9f65
Auto merge of #9295 - Guilherme-Vasconcelos:manual-empty-string-creation, r=dswij
...
Add `manual_empty_string_creations` lint
Closes #2972
- [x] Followed [lint naming conventions][lint_naming]
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `cargo dev update_lints`
- [x] Added lint documentation
- [x] Run `cargo dev fmt`
changelog: [`manual_empty_string_creations`]: Add lint for empty String not being created with `String::new()`
2022-08-19 11:19:06 +00:00
Samuel E. Moelius III
a05cb74d30
Enhance needless_borrow to consider trait implementations
2022-08-16 18:34:51 -04:00
Guilherme-Vasconcelos
80826c3944
Implement clippy::manual_empty_string_creations lint
2022-08-14 12:45:24 -03:00
Lukas Lueg
657b0da912
Add partialeq_to_none lint
...
Fixes #9275
2022-08-08 20:17:13 +02:00
Federico Guerinoni
0696624ba7
Add elapsed_instant lint
...
Closes #8603
Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com >
2022-08-01 23:39:00 +02:00
Andy Caldwell
66b46749e6
Change lint name to plural
2022-07-29 19:35:39 +01:00
Andy Caldwell
2f48257cfb
Rename "blacklisted name" to "disallowed name" throughout
2022-07-29 19:35:18 +01:00
bors
53a09d4855
Auto merge of #9252 - Metaswitch:use-deprecated-config, r=Jarcho
...
Read and use deprecated configuration (as well as emitting a warning)
Original change written by `@flip1995` I've simply rebased to master and fixed up the formatting/tests. This change teaches the configuration parser which config key replaced a deprecated key and attempts to populate the latter from the former. If both keys are provided this fails with a duplicate key error (rather than attempting to guess which the user intended).
Currently this on affects `cyclomatic-complexity-threshold` -> `cognitive-complexity-threshold` but will also be used in #8974 to handle `blacklisted-names` -> `disallowed-names`.
```
changelog: deprecated configuration keys are still applied as if they were provided as their non-deprecated name.
```
- [x] `cargo test` passes locally
- [x] Run `cargo dev fmt`
2022-07-29 00:54:10 +00:00
Philipp Krones
0905ec465d
Merge remote-tracking branch 'upstream/master' into rustup
2022-07-28 18:55:32 +02:00
Philipp Krones
08e7ec4047
Read and use deprecated configuration (as well as emitting a warning)
...
Co-authored-by: Andy Caldwell <andycaldwell@microsoft.com >
2022-07-27 17:47:20 +01:00
bors
8882578a67
Auto merge of #9130 - c410-f3r:arith, r=llogiq
...
Add `Arithmetic` lint
Fixes https://github.com/rust-lang/rust-clippy/issues/8903
r? `@llogiq`
changelog: Add `Arithmetic` lint
2022-07-25 21:26:15 +00:00
bors
c76db5c04e
Auto merge of #9243 - Jarcho:std_core, r=Manishearth
...
Don't lint `std_instead_of_core` on `std::env`
fixes #9239
This also reorders the execution of the lint to do as little as possible in the case where the path doesn't start with `std` or `alloc`.
changelog: [`std_instead_of_core`](https://rust-lang.github.io/rust-clippy/master/#std_instead_of_core ): Don't lint on `use std::env`
changelog: [`std_instead_of_alloc`](https://rust-lang.github.io/rust-clippy/master/#std_instead_of_alloc ): Don't lint `use std::vec` twice
2022-07-25 15:19:41 +00:00
tabokie
8454602cef
Add [assertions_on_result_states] lint
...
Signed-off-by: tabokie <xy.tao@outlook.com >
2022-07-25 22:42:41 +08:00
Jason Newcomb
6bc024df18
Improve [std|alloc]_instead_of_[alloc|core] lints
...
* Don't call `TyCtxt::crate_name` unless necessary
* Don't lint on `use std::env`
* Only lint once on `use std::vec`
2022-07-24 23:15:39 -04:00
Caio
31e5465f8a
Add Arithmetic lint
2022-07-18 14:29:45 -03:00
Xiretza
7a5965b459
unused_self: respect avoid-breaking-exported-api
2022-07-18 10:57:08 +02:00
Philipp Krones
7d4daaa8fa
Merge commit 'fdb84cbfd25908df5683f8f62388f663d9260e39' into clippyup
2022-07-18 09:39:37 +02:00
Caio
f88a1399bb
Stabilize let_chains
2022-07-16 20:17:58 -03:00
i509VCB
2f825db578
std_instead_of_core, std_instead_of_alloc, alloc_instead_of_core
2022-07-14 16:05:52 -05:00
Serial
de646e10db
Add invalid_utf8_in_unchecked
2022-07-03 15:37:30 -04:00
Philipp Krones
09f5df5087
Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup
2022-06-30 10:50:09 +02:00
Jason Newcomb
ffbba8550a
Move SelfAssignment into Operators lint pass
2022-06-28 13:03:08 -04:00
Jason Newcomb
92891a01a1
Move PtrEq into Operators lin pass
2022-06-28 12:51:30 -04:00
Jason Newcomb
fc5eac5894
Move NeedlessBitwiseBool into Operators lint pass
2022-06-28 12:51:30 -04:00
Jason Newcomb
71c2daa60a
Move ModuloArithmetic into Operators lint pass
2022-06-28 12:51:30 -04:00
Jason Newcomb
a8df16ae1d
Move IntegerDivision into Operators lint pass
2022-06-28 12:51:30 -04:00
Jason Newcomb
83de67cfec
Move IdentityOp into Operators lint pass
2022-06-28 12:51:30 -04:00
Jason Newcomb
56f50d36e7
Move FloatEqualityWithoutAbs into Operators lint pass
2022-06-28 12:51:29 -04:00
Jason Newcomb
3de70a4996
Move ErasingOp into Operators lint pass
2022-06-28 12:51:29 -04:00
Jason Newcomb
0adb3c0518
Move EqOp into Operators lint pass
2022-06-28 12:51:29 -04:00
Jason Newcomb
732d7162ab
Move DurationSubsec into Operators lint pass
2022-06-28 12:51:29 -04:00
Jason Newcomb
4ac3626f2e
Move DoubleComparison into Operators lint pass
2022-06-28 12:51:29 -04:00
Jason Newcomb
68a7fd22ad
Move BitMask into Operators lint pass
2022-06-28 12:51:26 -04:00