bors[bot]
0ad5b9b9e0
Merge #3388
...
3388: RIIR update lints: Generate deprecated lints r=phansch a=phansch
The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.
Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.
cc #2882
Co-authored-by: Philipp Hansch <dev@phansch.net>
2018-11-02 06:29:40 +00:00
Philipp Hansch
64bd658516
RIIR update lints: Generate deprecated lints
...
The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.
Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.
2018-10-31 08:03:50 +01:00
Michael Wright
267d5d3433
Fix lint_without_lint_pass
2018-10-29 20:28:06 +01:00
Shotaro Yamada
3ca0895920
Add redundant_clone lint
2018-10-26 01:15:55 +09:00
HMPerson1
aabf8083bd
Add lint for calling mem::discriminant
on a non-enum type
2018-10-24 23:39:54 -04:00
bors[bot]
319b75c75b
Merge #3349
...
3349: Fixes #3347 : Lint for wildcard dependencies in Cargo.toml r=ordovicia a=ordovicia
Add a lint for wildcard dependencies in Cargo.toml.
How should I write a test for this lint?
Fixes #3347
Co-authored-by: Hidehito Yabuuchi <hdht.ybuc@gmail.com>
2018-10-24 12:21:19 +00:00
Hidehito Yabuuchi
0263ddde92
Lint for wildcard dependencies in Cargo.toml
2018-10-24 15:00:28 +09:00
Owen Sanchez
50b9e7aebc
Don't emit new_without_default_derive
if an impl of Default exists
2018-10-23 20:44:31 -07:00
CYBAI
66ae3b1249
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
...
Also, making the old one deprecated
2018-10-17 11:20:42 +08:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
8b12eee112
Merge pull request #3233 from rust-lang-nursery/unused-unit
...
new lint: unused_unit
2018-10-13 09:30:19 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
78860a71d8
Merge pull request #3298 from devonhollowood/pedantic-dogfood-naming
...
Pedantic dogfood: naming and docs
2018-10-13 09:24:55 +02:00
Devon Hollowood
335bc1e820
Fix some more stutter
warnings
2018-10-12 17:07:48 -07:00
Andre Bogus
e8687a6677
unused unit lint
2018-10-13 00:42:55 +02:00
sigustin
4e20625187
Add a comment reminding to update README if the default changes
2018-10-12 12:32:48 +02:00
Oliver Scherer
9d3373137b
Remove now-useless allow(unknown_lints)
2018-10-11 12:18:27 +02:00
Oliver Scherer
b8654eaa6c
Stabilize tool lints
2018-10-11 12:16:22 +02:00
Devon Hollowood
eef2e8948b
Fix cast_possible_truncation warnings
2018-10-08 21:40:21 -07:00
Manish Goregaokar
e9c025ea70
Add license header to Rust files
2018-10-06 09:43:08 -07:00
Philipp Hansch
c0ab8b2531
Reimplement the fn_to_numeric_cast_with_truncation
lint
2018-10-04 21:44:16 +02:00
Philipp Hansch
f42272102a
Reimplement the fn_to_numeric_cast
lint
2018-10-03 12:02:06 +02:00
Oliver Schneider
b36bb0a68d
Reimplement the map_clone
lint from scratch
2018-10-02 15:13:43 +02:00
Manish Goregaokar
057243f16b
relicensing: Remove map_clone
...
This removes the code added in https://github.com/rust-lang-nursery/rust-clippy/pull/427
2018-10-02 12:51:38 +02:00
Manish Goregaokar
fffcd093b2
relicensing: Remove fn_to_numeric_cast, fn_to_numeric_cast_with_truncation
...
This removes the code added in https://github.com/rust-lang-nursery/rust-clippy/pull/2814
2018-10-02 12:49:27 +02:00
Michael Wright
f5ffac4fce
Implement unnecesary_filter_map lint
2018-09-26 06:52:36 +02:00
Jane Lusby
14feb3670f
Lint for chaining flatten after map
...
This change adds a lint to check for instances of `map(..).flatten()`
that can be trivially shortened to `flat_map(..)`
Closes #3196
2018-09-24 14:29:16 -07:00
Jay Kickliter
12c7bc1e58
mem_replace: apply update_lints tool.
2018-09-19 14:41:22 -07:00
Jay Kickliter
598df08d88
Add lint for mem::replace(.., None)
.
...
Suggest `Option::take()` as an alternative.
2018-09-19 14:38:34 -07:00
flip1995
aaeeaa5330
Add internal lint compiler_lint_functions
2018-09-15 11:01:16 +02:00
Eduard-Mihai Burtescu
9219fc6c5c
Reintroduce extern crate
for non-Cargo dependencies.
2018-09-15 11:10:51 +03:00
Matthias Krüger
28424ecbfa
fix warnings about trivial casts, mostly {i,u}128 -> {i,u}128, such as "i128::min_value() as i128"
2018-09-13 07:59:12 +02:00
Philipp Hansch
e8400061bd
Merge pull request #3085 from mikerite/revert-98dbce
...
Revert "Fix E0502 warnings"
2018-09-13 06:33:26 +01:00
Matthias Krüger
f6935be71e
clippy_lints: enable crate_visibility_modifier since it is used but no longer part of 2018 edition.
...
Fixes build with https://github.com/rust-lang/rust/pull/53999
2018-09-08 01:32:40 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
63a46b1e1a
Merge pull request #3129 from mipli/3091-numeric-typo
...
Add lint for misstyped literal casting
2018-09-07 09:54:43 +02:00
Michael A. Plikk
38d287fecd
Add lint for misstyped literal casting
2018-09-05 19:46:49 +02:00
Josh Holmer
fbc93c0166
Lint against needless uses of collect()
...
Handles cases of `.collect().len()`, `.collect().is_empty()`, and
`.collect().contains()`. This lint is intended to be generic enough to
be added to at a later time with other similar patterns that could be
optimized.
Closes #3034
2018-09-03 23:29:44 -04:00
Josh Triplett
779988303a
iter conservation efforts: save the endangered .iter() and .into_iter()
...
Make explicit_iter_loop and explicit_into_iter_loop allow-by-default, so
that people can turn them on if they want to enforce that style; avoid
presenting them as *the* idiomatic Rust style, rather than just *a* style.
2018-09-03 01:24:46 -07:00
Nick Cameron
d6f01f3a6c
Make Conf::default
available
...
Fixes RLS
2018-09-03 13:57:50 +12:00
Manish Goregaokar
c81d70e6bd
Merge pull request #2977 from flip1995/tool_lints
...
Implement tool_lints
2018-09-01 11:22:23 +05:30
Manish Goregaokar
e0ad732226
Merge pull request #3105 from frewsxcv/frewsxcv-private
...
Make clippy_lints::{utils,consts} modules private, remove unused items.
2018-08-29 11:24:00 -07:00
flip1995
daa4f0ad34
Implement backwards compatibility changes introduced by rust-lang/rust#53762
2018-08-29 11:08:29 -07:00
flip1995
f3bb161f0e
Adapt codebase to the tool_lints
2018-08-29 11:08:29 -07:00
flip1995
8c07772dbb
Switch to declare_tool_lint macro
2018-08-29 11:08:29 -07:00
flip1995
392235d6e1
Switch to tool_lints
2018-08-29 11:08:29 -07:00
Corey Farwell
feb3e9fd5f
switch lint from 'style' to 'complexity'
2018-08-29 07:02:26 -05:00
Corey Farwell
5ebae01c1e
New lint: Suggest ptr.add([usize])
over ptr.offset([usize] as isize)
.
...
First part of #3047 .
2018-08-28 23:21:29 -05:00
Corey Farwell
05f637cf88
Make clippy_lints::{utils,consts} modules private, remove unused items.
2018-08-28 21:32:20 -05:00
Philipp Krones
9ce826ade1
Merge pull request #3082 from mikerite/move-range-lints
...
Move some range lints to complexity
2018-08-26 15:08:21 +02:00
Michael Wright
95fedd2273
Revert "Fix E0502 warnings"
...
This reverts commit 98dbce4fe4
.
The compiler no longer emits the warnings in #2982 with the original
code.
2018-08-26 11:21:22 +02:00
Michael Wright
eef3ffab35
Remove iterator_find_map
feature attribute
...
Closes #3083
2018-08-26 11:11:47 +02:00
Michael Wright
cc87dc7539
Move some range lints to complexity
...
Recategorize `range_plus_one` and `range_minus_one` to `complexity`.
This moves `range_plus_one` out of the nursery as the inclusive range
syntax is now stable. Both are moved to `complexity` as it is more
consistent with other lints such as `int_plus_one`.
2018-08-26 10:57:04 +02:00