Commit Graph

902 Commits

Author SHA1 Message Date
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
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
tabokie
8454602cef Add [assertions_on_result_states] lint
Signed-off-by: tabokie <xy.tao@outlook.com>
2022-07-25 22:42:41 +08:00
Caio
31e5465f8a Add Arithmetic lint 2022-07-18 14:29:45 -03:00
bors
cce617165d Auto merge of #9148 - arieluy:then_some_unwrap_or, r=Jarcho
Add new lint `obfuscated_if_else`

part of #9100, additional commits could make it work with `then` and `unwrap_or_else` as well

changelog: Add new lint `obfuscated_if_else`
2022-07-18 12:45:11 +00:00
Ariel Uy
9ff7c91100 Add new lint obfuscated_if_else
New lint suggests using `if .. else ..` instead of
`.then_some(..).unwrap_or(..)`.
2022-07-17 18:44:49 -07:00
i509VCB
2f825db578
std_instead_of_core, std_instead_of_alloc, alloc_instead_of_core 2022-07-14 16:05:52 -05:00
bors
0930ac91b9 Fix typos
changelog: none
2022-07-13 14:48:32 +00:00
Serial
de646e10db Add invalid_utf8_in_unchecked 2022-07-03 15:37:30 -04:00
Takayuki Nakata
1988375a25 Fix some links 2022-07-01 21:30:59 +09:00
bors
2d0195986c Auto merge of #9058 - xFrednet:changelog-1-62, r=flip1995
Changelog for Rust 1.62 🦖

This special artifact was just discovered. The artifact details changes to something called Clippy. Presently and from the context, we were unable to determine what this is supposed to be. All we know, is that it seems to have an active community around it which supports it. The members sometimes use paper clips as a secret symbol for Clippy.

I want to donate this artifact to the rust-lang organization, to have it displayed to the public.

---

changelog: none
2022-06-30 17:33:33 +00:00
Jason Newcomb
8a74d33570 Add explicit_auto_deref lint 2022-06-28 12:48:24 -04:00
xFrednet
c5820022d5
Changelog for Rust 1.62 🦖 2022-06-28 12:20:24 +02:00
bors
fdd0e727e2 Auto merge of #8649 - ebobrow:imperative_find, r=flip1995
add [`manual_find`] lint for function return case

part of the implementation discussed in #7143

changelog: add [`manual_find`] lint for function return case
2022-06-27 17:15:25 +00:00
kyoto7250
dd3d0fdad3 rename use_retain => manual_retain 2022-06-27 08:11:58 +09:00
kyoto7250
5f2b8e67b3 feat(new lint): new lint use_retain 2022-06-27 08:11:58 +09:00
Evan Typanski
e5ebd3edab Implement manual_rem_euclid lint 2022-06-21 14:13:15 -04:00
kyoto7250
2bb8c45026 feat(lint): add default_iter_empty
Update description in clippy_lints/src/default_iter_empty.rs

Co-authored-by: Fridtjof Stoldt <xFrednet@gmail.com>

Update clippy_lints/src/default_iter_empty.rs

Co-authored-by: Alex Macleod <alex@macleod.io>

Update clippy_lints/src/default_iter_empty.rs

Co-authored-by: Alex Macleod <alex@macleod.io>

renamed default_iter_empty to default_instead_of_iter_empty

Avoid duplicate messages

add tests for regression

rewrite 'Why is this bad?'

cargo dev fmt

delete default_iter_empty lint in renamed_lint.rs

rewrite a message in the suggestion

cargo dev update_lints --check
2022-06-17 21:34:36 +09:00
tamaron
14478bb94b add lint 2022-06-14 23:30:43 +09:00
Dennis Luxen
61d7dd2af0 Update CHANGELOG.md 2022-06-05 22:47:29 +02:00
Dennis Luxen
58a605f453 Rerun cargo dev update_lints 2022-06-05 22:47:08 +02:00
Dennis Luxen
5948959c7e Fix misnomer braces -> parenthesis 2022-06-05 22:46:23 +02:00
Dennis Luxen
ba43f0aee9 Add new lint [needless_braces_on_range_literal] 2022-06-05 22:45:57 +02:00
DevAccentor
64fe4e32db add as_underscore lint 2022-06-03 18:11:23 +02:00
Ariel Uy
58cd01c2fc Add new lint mismatching_type_param_order
Add new lint for checking if type parameters are consistent between type
definitions and impl blocks.
2022-06-03 00:04:55 -07:00
bors
c4c413b6fc Auto merge of #7930 - lengyijun:needless_deref_new, r=Jarcho
new lint: `borrow_deref_ref`

changelog: ``[`borrow_deref_ref`]``

Related pr: #6837 #7577
`@Jarcho` Could you please give a review?

`cargo lintcheck` gives no false negative (but tested crates are out-of-date).

TODO:
1. Not sure the name. `deref_on_immutable_ref` or some others?
2022-06-01 16:43:14 +00:00
Jason Newcomb
ca78e2428e Add lint swap_ptr_to_ref 2022-05-31 13:08:05 -04:00
Jason Newcomb
eb2908b4ea Add lint almost_complete_letter_range 2022-05-30 23:20:04 -04:00
lyj
c5410150eb needless_deref 2022-05-30 01:46:15 +00:00
llogiq
c9be57dbf3
Merge branch 'master' into doc_link_with_quotes 2022-05-28 10:55:25 +02:00
Micha White
d8a281ef73
Added an unused_rounding lint 2022-05-24 22:53:29 -04:00
kyoto7250
1dd026698d feat(lint): impl lint about use first() instead of get(0) 2022-05-25 09:08:23 +09:00
bors
fbb9e565e3 Auto merge of #8754 - guerinoni:no_effect_replace, r=llogiq
New lint `no_effect_replace`

Closes #1595

Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>

changelog: Add [`no_effect_replace`] lint.
2022-05-24 16:55:06 +00:00
Federico Guerinoni
ea62347a5a New lint no_effect_replace
Closes #1595

changelog: Add no_effect_replace lint.
2022-05-24 11:08:41 +02:00
xFrednet
4e6cf0036e
Merge remote-tracking branch 'upstream/master' into rustup 2022-05-20 20:47:31 +02:00
bors
879cd37fde Auto merge of #8840 - xFrednet:0000-mini-changelog-update, r=llogiq
Mini changelog update for Rust 1.61.0

I'll do the full release and sync tomorrow, as I sadly don't have the time today. This is a quick update to ensure that Rust's changelog will link to the correct section in our changelog.  The change is according to [our docs](8751e47bae/book/src/development/infrastructure/release.md (update-changelogmd))

changelog: none
2022-05-19 20:02:29 +00:00
Fridtjof Stoldt
b787f4ce2b
Mini changelog update for Rust 1.61.0 2022-05-19 13:43:17 +02:00
Elliot Bobrow
430575b61a add manual_find lint for function return case 2022-05-16 20:20:49 -07:00
Jason Newcomb
f7378daf71 Add renamed lints to the changelog link list 2022-05-15 17:10:48 -04:00
Jason Newcomb
50eada16f7 Rename eval_order_dependence to mixed_read_write_in_expression 2022-05-15 17:08:45 -04:00
Alex Macleod
1f79a442e5 Add duplicate_mod lint 2022-05-14 22:31:13 +01:00
bors
d422baa30c Auto merge of #8796 - nsunderland1:master, r=giraffate
New lint: [`derive_partial_eq_without_eq`]

Introduces a new lint, [`derive_partial_eq_without_eq`].

See: #1781 (doesn't close it though).

changelog: add lint [`derive_partial_eq_without_eq`]
2022-05-10 13:25:27 +00:00
yonip23
feb6d8cf30 introduce rc_clone_in_vec_init lint 2022-05-10 15:10:13 +03:00
nsunderland1
fe84ff3360 New lint: [derive_partial_eq_without_eq] 2022-05-09 22:13:39 -07:00
Preston From
41c7e4d382 Lint for significant drops who may have surprising lifetimes #1
author Preston From <prestonfrom@gmail.com> 1645164142 -0600
committer Preston From <prestonfrom@gmail.com> 1650005351 -0600
2022-05-06 21:48:17 -06:00
flip1995
7cd86aa1be Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyup 2022-05-05 15:12:52 +01:00
Max Baumann
fea177fafe
add trim_split_whitespace 2022-05-04 15:04:05 +02:00