Commit graph

587 commits

Author SHA1 Message Date
Matthias Krüger
081641249e README: fix lit count line
It looks like after changing to "there are more than 120 lints", an older PR was merged
and resolving merge conflicts this was changed back to "there are 123 lints" causing the update-script to silently fail.

Changed back the README.md back to the new format fixes the problem.
2020-04-23 16:11:18 +02:00
Devin R
7242fa5e41 fix map import to rustc_middle 2020-04-20 06:30:01 -04:00
Devin R
2e8a2de4af dev update_lints 2020-04-20 06:30:01 -04:00
Matthias Krüger
65bc234c5c readme: update to cargo clippy --fix command 2020-04-16 22:19:11 +02:00
flip1995
cbdf4cc71e
Run update_lints 2020-03-31 17:24:09 +02:00
flip1995
3155eedb68
Don't use an exact lint counter anymore 2020-03-31 17:24:09 +02:00
Tomasz Miąsko
b77b219280 Lint unnamed address comparisons 2020-03-30 21:42:16 +02:00
bors
bfd11235a6 Auto merge of #5380 - lzutao:deprecate-REPLACE_CONSTS, r=phansch
Deprecate REPLACE_CONSTS lint

Closes #5346
changelog: Deprecate `replace_consts` lint
2020-03-30 08:03:42 +00:00
Matthias Krüger
8fbf02c8fb readme: move "how to run single lint" instructions to "Allowing/denying lints" section. 2020-03-29 17:01:56 +02:00
Lzu Tao
d055b7d61c Deprecate REPLACE_CONSTS lint 2020-03-29 12:59:35 +07:00
Matthias Krüger
b0de238b65 readme: explain how to run only a single lint on a codebase 2020-03-25 11:37:07 +01:00
Tim Robinson
52208f3cf3 Lint for pub(crate) items that are not crate visible due to the visibility of the module that contains them
Closes #5274.
2020-03-16 12:21:00 +00:00
Jacob Meyers
0f7f30711e add lint on File::read_to_string and File::read_to_end 2020-03-06 09:50:49 -05:00
Devin R
597e02dcdf warn on macro_use attr 2020-03-04 09:36:02 -05:00
ThibsG
2aa14c9beb Add restrictive pat use in full binded struct 2020-03-04 09:11:07 +01:00
Krishna Sai Veera Reddy
ff0d44e45a Add imprecise_flops lint
Add lint to detect floating point operations that can be computed more
accurately at the cost of performance. `cbrt`, `ln_1p` and `exp_m1`
library functions call their equivalent cmath implementations which is
slower but more accurate so moving checks for these under this new lint.
2020-02-23 22:36:15 -08:00
flip1995
4229dbcf33
Run update_lints 2020-02-21 11:14:16 +01:00
Krishna Sai Veera Reddy
219c94d028 Separate out lint to check lossy whole number float literals 2020-02-20 22:33:36 -08:00
flip1995
7a85b7761b
Update Copyright year 2020-02-20 12:06:45 +01:00
flip1995
6835e2d8e0
Nuke Travis+AppVeyor CI 2020-02-18 10:08:58 +01:00
flip1995
fb59043621
Change badge branch master -> auto
For some reason GHA classifies the bors merges on the master branch as a
push to the auto branch, even though the workflow got triggered by a
push to the master branch. I guess this has something to do with the
same commit hash on master+auto directly after the merge?
2020-02-12 12:13:59 +01:00
flip1995
d7620a3e62
Add GHA badge to README.md
Add a FIXME to Cargo.toml
2020-02-12 09:34:26 +01:00
flip1995
757bbf7feb
Fix markdown Files
Rendered:

[CHANGELOG.md](https://github.com/flip1995/rust-clippy/blob/gha/CHANGELOG.md)
[CODE_OF_CONDUCT.md](https://github.com/flip1995/rust-clippy/blob/gha/CODE_OF_CONDUCT.md)
[CONTRIBUTING.md](https://github.com/flip1995/rust-clippy/blob/gha/CONTRIBUTING.md)
[README.md](https://github.com/flip1995/rust-clippy/blob/gha/README.md)
[clippy_dummy/PUBLISH.md](https://github.com/flip1995/rust-clippy/blob/gha/clippy_dummy/PUBLISH.md)
[doc/adding_lints.md](https://github.com/flip1995/rust-clippy/blob/gha/doc/adding_lints.md)
[etc/relicense/RELICENSE_DOCUMENTATION.md](https://github.com/flip1995/rust-clippy/blob/gha/etc/relicense/RELICENSE_DOCUMENTATION.md)
2020-02-12 09:34:25 +01:00
Krishna Sai Veera Reddy
be1bc571c3 Add option-env-unwrap lint 2020-02-08 16:44:35 -08:00
Areredify
338fb7a3e9 add excessive bools lints 2020-02-05 20:54:58 +03:00
ThibsG
53094de08e Merge fixes 2020-02-04 22:53:24 +01:00
Mikhail Babenko
9b88a2b295 decouple 'let_underscore' tests 2020-01-30 16:51:23 +03:00
xiongmao86
512efbea23 Declare lint and implement lint logic. 2020-01-30 00:21:29 +08:00
Areredify
796958c7e2 add option_as_ref_deref lint 2020-01-23 16:12:16 +03:00
Yuki Okushi
95c369fa91 Add skip_while_next lint 2020-01-20 10:56:02 +09:00
xiongmao86
bba468887b Pull master, rebase, and update_lints again. 2020-01-12 19:54:17 +08:00
ThibsG
0fa0df9efb Span help without suggestion 2020-01-07 19:10:59 +01:00
Krishna Sai Veera Reddy
9e6a6069a7 Add lint to detect usage of invalid atomic ordering
Detect usage of invalid atomic ordering modes such as
`Ordering::{Release, AcqRel}` in atomic loads and
`Ordering::{Acquire, AcqRel}` in atomic stores.
2020-01-06 16:39:31 -08:00
Brad Sherman
ab5ff0352e Add lint for iter.nth(0)
- Encourage iter.next() rather than iter.nth(0), which is less readable
2020-01-04 11:20:11 -06:00
Krishna Veera Reddy
42e4595d3a Indicate anonymous lifetimes for types 2019-12-31 09:22:35 -08:00
mgr-inz-rafal
f191e916bd Add new lint (modulo_arithmetic) 2019-12-28 16:46:08 +01:00
Andre Bogus
40435acf3d new lint: mutable_key_type 2019-12-24 13:46:19 +01:00
Mikhail Babenko
a310cb2d0b implemented let_underscore lint
actually add files

update lints

change to pedantic
2019-12-22 22:10:25 +03:00
bors
19dbb22032 Auto merge of #4930 - flip1995:unused_label, r=phansch
Deprecate unused_label lint

This lint was uplifted/turned into warn-by-default in rustc

Fixes #4925

changelog: Deprecate [`unused_label`] lint
2019-12-22 09:39:32 +00:00
flip1995
710c749bb1
Deprecate unused_label lint
This lint was uplifted/turned into warn-by-default in rustc
2019-12-21 16:20:30 +01:00
Oliver Scherer @ Cosmian
a7e9aa367b
There are no per-file copyright headers anymore 2019-12-20 09:57:02 +01:00
Krishna Veera Reddy
c77fc06d52 Add lint to detect transmutes from float to integer
Add lint that detects transmutation from a float to an integer
and suggests usage of `{f32, f64}.to_bits()` instead.
2019-12-07 16:33:49 -08:00
RobbieClarken
f5d0a452ba Add lint for pub fns returning a Result without documenting errors
The Rust Book recommends that functions that return a `Result` type have
a doc comment with an `# Errors` section describing the kind of errors
that can be returned
(https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#commonly-used-sections).
This change adds a lint to enforce this. The lint is allow by default;
it can be enabled with `#![warn(clippy::missing_errors_doc)]`.

Closes #4854.
2019-12-06 17:19:05 +10:30
Mikhail Babenko
9ec8888b91 implemented as_conversions lint
actuall add files

add better example and change pedantic to restriction
2019-11-25 18:12:52 +03:00
flip1995
9b4faf97f3
Run update_lints 2019-11-23 17:57:28 +01:00
Andre Bogus
c21b198576 New lint: zst_offset 2019-11-15 22:39:27 +01:00
Michael Wright
5817a4fa06 Add to_digit_is_some lint 2019-11-10 15:52:59 +02:00
Heinz N. Gies
2f1370d64c Update lints 2019-11-07 17:13:26 +01:00
Heinz N. Gies
eae6a62db7 Simplify dentry point detection 2019-11-07 17:11:05 +01:00
flip1995
08fd397c2c
Deprecate into_iter_on_array lint
This lint was uplifted/reimplemented by rustc.
Rustup to rust-lang/rust#66017
2019-11-07 14:04:29 +01:00