Commit Graph

2642 Commits

Author SHA1 Message Date
BO41
dd007e4477 Change from ignore to rust 2019-06-02 20:06:50 +02:00
BO41
bd8f289247 Add example to needless_range_loop 2019-06-02 15:28:32 +02:00
Lzu Tao
f67c3e4b2a Make use of new outer_expn_info() function 2019-06-01 16:25:51 +07:00
bors
b1762e3e4a Auto merge of #4157 - phansch:update_pulldown_cmark2, r=matthiaskrgr
Update pulldown_cmark to 0.5.2

Includes various parsing fixes. Most notably [this PR][pr]

changelog: none

[pr]: https://github.com/raphlinus/pulldown-cmark/pull/325
2019-05-30 12:07:48 +00:00
bors
0ab3f1762e Auto merge of #4113 - rust-lang:author, r=flip1995
Fix `Block`  dump in author lint

changelog: The `#[clippy::author]` attribute now emits correct pattern code for block expressions
2019-05-30 10:34:56 +00:00
Philipp Hansch
a34991228a
Update pulldown_cmark to 0.5.2
Includes various parsing fixes. Most notably [this PR][pr]

[pr]: https://github.com/raphlinus/pulldown-cmark/pull/325
2019-05-30 12:26:22 +02:00
bors
018fa30c56 Auto merge of #4153 - matthiaskrgr:rustup_5, r=flip1995
rustup https://github.com/rust-lang/rust/pull/60928

changelog: none
2019-05-29 20:01:57 +00:00
Matthias Krüger
22e77dfa98 rustup https://github.com/rust-lang/rust/pull/60928 2019-05-29 00:41:34 +02:00
Matthias Krüger
c9cc11e9fa rustup https://github.com/rust-lang/rust/pull/61164
(which is included in https://github.com/rust-lang/rust/pull/61274)
2019-05-28 20:47:16 +02:00
Oliver Scherer
f98e4bd33b
Fix Block dump in author lint 2019-05-28 13:01:11 +02:00
bors
fb33fad08e Auto merge of #4142 - agnxy:rename-assoc, r=flip1995
Rename "Associated*" to "Assoc*"

This is to fix the breakage introduced by rust-lang/rust#60163.

changelog: none
2019-05-28 08:59:06 +00:00
bors
d57845ffdf Auto merge of #4071 - matthiaskrgr:sizeof, r=flip1995
trivially_copy_pass_by_ref: print size of type and limit in the lint message

changelog: trivially_copy_pass_by_ref: print size of type and limit in the lint message
2019-05-28 07:56:04 +00:00
Oliver Scherer
73d1830812 Rustup to rustc 1.36.0-nightly (fa40a111f 2019-05-27) 2019-05-27 21:58:54 +02:00
bors
7b501f0f6a Auto merge of #4137 - euclio:let-return, r=oli-obk
tweak `let_and_return` diagnostic

changelog: `let_and_return`: label the unnecessary let binding and convert the note to a structured
suggestion
2019-05-27 13:04:14 +00:00
bors
eb0a2884d2 Auto merge of #4149 - flip1995:rollup-6knpdqb, r=flip1995
Rollup of 2 pull requests

Successful merges:

 - #4102 (Fix match_same_arms to fail late)
 - #4119 (Improve non ascii literal)

Failed merges:

r? @ghost
2019-05-27 11:33:29 +00:00
Philipp Krones
dce670c73c
Rollup merge of #4119 - BO41:non_ascii_literal, r=flip1995
Improve non ascii literal

This PR improves the example of the [non_ascii_literal](https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal) lint.
It also makes it auto-fixable.

Please review. This is my first PR to this project.
(Thanks @flip1995 for the help :)

changelog: none
fixes #4117
2019-05-27 13:09:17 +02:00
Philipp Krones
f0a767352b
Rollup merge of #4102 - Urriel:fix/4096_match_same_arms, r=flip1995
Fix match_same_arms to fail late

Changes:
- Add a function search_same_list which return a list of matched expressions
- Change the match_same_arms implementation behavior. It will lint each same arms found.

fixes #4096

changelog: none
2019-05-27 13:09:16 +02:00
bors
cf81a3b6d0 Auto merge of #3832 - HarrisonMc555:use_last, r=flip1995
Implement "Use last" lint

Closes #3673

This lint checks the use of `x.get(x.len() - 1)` and suggests `x.last()` (where `x` is a `Vec`).

There's at least one more thing that needs to happen here. I believe I am correctly checking most of the scenarios and avoiding false positives. However, if different `Vec`s are used for the `x.get` and `y.len`, then it will emit a false positive. In other words, I need to check to make sure the `Vec`s are the same.

Also, a lot of these commits were temporary and not helpful to the project history...am I supposed to squash on merge? If so, how do I do that?

changelog: New lint: `get_last_with_len`
2019-05-27 11:04:38 +00:00
Seo Sanghyeon
2c53a3f970 Fix typo in comment 2019-05-27 12:32:04 +09:00
Oliver Scherer
637e656451 Rustfmt 2019-05-26 17:36:21 +02:00
Oliver Scherer
fd2ecfcc89 Rustup to rustc 1.36.0-nightly (2268d9923 2019-05-26) 2019-05-26 16:47:26 +02:00
Andrew Xu
dcf064a4f9 Rename "Associated*" to "Assoc*"
This is to fix the breakage introduced by rust-lang/rust#60163.
2019-05-25 20:31:34 +08:00
Philipp Hansch
a650659d63
Rustup to https://github.com/rust-lang/rust/pull/61026 2019-05-25 09:45:07 +02:00
Andy Russell
effea41fe4
tweak let_and_return diagnostic
Label the unnecessary let binding and convert the note to structured
suggestion.
2019-05-24 14:52:55 -04:00
Matthias Krüger
c67d2b121a rustup https://github.com/rust-lang/rust/pull/60803/ 2019-05-24 15:25:36 +02:00
Philipp Hansch
aca56727db
Rustup to https://github.com/rust-lang/rust/pull/59545 2019-05-24 08:19:51 +02:00
Matthias Krüger
5d58163f7d trivially_copy_pass_by_ref: print size of type and limit in the lint message 2019-05-23 23:48:20 +02:00
Philipp Hansch
7e9db162b5
Rollup merge of #4129 - matthiaskrgr:if_chain, r=phansch
update if_chain to 1.0.0
2019-05-23 21:28:49 +02:00
Philipp Hansch
a316179850
Rustup to https://github.com/rust-lang/rust/pull/60965 2019-05-23 20:19:00 +02:00
Matthias Krüger
655aef7c6c update if_chain to 1.0.0 2019-05-23 17:23:59 +02:00
Philipp Hansch
edb698105f
cargo fmt
Roses are red
Violets are blue
`Add rustfmt to a pre-commit hook` is what I should do.
2019-05-23 07:24:53 +02:00
Philipp Hansch
635a2fa5df
Rustup to https://github.com/rust-lang/rust/pull/60740
changelog: none
2019-05-23 07:19:25 +02:00
Manish Goregaokar
a6cf35264f Rustup to rustc 1.36.0-nightly (dbfe70dfc 2019-05-22) 2019-05-21 21:58:27 -07:00
Vincent Dal Maso
fa9f744c2c Add the common case search
Changes:
- Refactor the common case search into a function.
- Fix the useless Option around the vec in the search_same_list.
2019-05-21 13:08:19 +02:00
Philipp Krones
42d849c185
Formatting inside if_chain! macro 2019-05-21 10:45:38 +02:00
Harrison McCullough
f32c2fcb7e Implement get_last_with_len lint 2019-05-20 18:01:21 -06:00
BO41
36c8aaba8f Fix tests and make other ascii lints auto-fixable 2019-05-20 16:02:50 +02:00
BO41
859b329603 Make non_ascii_literal auto-fixable 2019-05-20 15:23:38 +02:00
BO41
874de889dc Improve verbosity of non_ascii_literal lint example 2019-05-20 15:08:53 +02:00
bors
fd56381015 Auto merge of #4088 - pJunger:check1, r=oli-obk
Added lint for TryFrom for checked integer conversion.

works towards #3947

Added lint for try_from for checked integer conversion.
Should recognize simple & straight-forward checked integer conversions.
2019-05-20 09:31:09 +00:00
bors
0417a0ac4d Auto merge of #4107 - taiki-e:useless_attribute, r=flip1995
useless_attribute: Add unreachable_pub to whitelists

Fixes #4106

changelog: `useless_attribute`: whitelist `unreachable_pub` on `use` items
2019-05-19 10:37:09 +00:00
bors
4071b2996e Auto merge of #4099 - flip1995:ul_4094, r=oli-obk
Add macro check for unreadable_literal lint

Closes #4094

changelog: Disable `unreadable_literal` lint inside macros
2019-05-19 08:46:43 +00:00
pJunger
f627fbdc59 Removed symbols again. 2019-05-18 10:54:03 +02:00
pJunger
7e0f2e3f1e Removed unused lifetime. 2019-05-18 09:34:56 +02:00
pJunger
ce9494a3df Changed impl to use symbols. 2019-05-18 09:34:56 +02:00
pJunger
00a5ef64a2 Added suggestion for conversion with is_ok. 2019-05-18 09:33:26 +02:00
pJunger
0a43dcfd04 Fixed more lint findings. 2019-05-18 09:33:26 +02:00
pJunger
1c86b3758d Fixed clippy lints in checked_conversions.rs. 2019-05-18 09:33:26 +02:00
pJunger
14d948c560 Registered lint. 2019-05-18 09:33:25 +02:00
pJunger
47444c44ad Added lint for TryFrom for checked integer conversion rust-lang#3947. 2019-05-18 09:33:25 +02:00