Commit graph

5355 commits

Author SHA1 Message Date
Matthias Krüger
38fabcbdf2 tests: fix formatting and update test output
fix script one last time™
2018-12-27 17:03:53 +01:00
Matthias Krüger
84ee884cc4 base tests: make sure to fail CI if tests need formatting 2018-12-27 16:56:08 +01:00
Matthias Krüger
bcc309f27d base tests: switch to nightly toolchain before checking formatting of tests with rustfmt
this errored because rustfmt is not available on the master toolchain
2018-12-27 16:56:07 +01:00
bors
721f688eff Auto merge of #3577 - daxpedda:master, r=flip1995
Fix false positives for `implicit_return` and `empty_loop` on macro expansion.

This PR only fixes `implicit_return` and `empty_loop`.
But I suspect this bug may affect a lot of other lints.
2018-12-27 15:21:22 +00:00
bors
44ffda7e76 Auto merge of #3578 - matthiaskrgr:rustc_tools_util, r=oli-obk
rustc_tools_util: changes in preparation of release on crates.io

I want to release my [cargo-cache](https://github.com/matthiaskrgr/cargo-cache) crate on crates.io however it depends on rustc_tools_util, thus I need to publish rustc_tools_util on crates.io first.

This PR expands the Cargo.toml and adds a readme.
2018-12-27 12:27:40 +00:00
bors
c10c515fae Auto merge of #3585 - matthiaskrgr:rustup, r=phansch
rustup https://github.com/rust-lang/rust/pull/57069
2018-12-27 10:48:24 +00:00
Matthias Krüger
99454bc9a1 rustup https://github.com/rust-lang/rust/pull/57069 2018-12-27 11:19:20 +01:00
bors
19af82c0ad Auto merge of #3579 - matthiaskrgr:tool_lints, r=flip1995
update CARGO_CLIPPY_HELP string to suggest tool lints.
2018-12-26 17:35:55 +00:00
daxpedda
2d96ef1315
Rustfmt. 2018-12-26 18:13:33 +01:00
bors
b0a1fac1f6 Auto merge of #3580 - matthiaskrgr:trivial_typos, r=flip1995
fix a couple of trivial typos (NFC).
2018-12-26 17:11:47 +00:00
bors
af14342e7b Auto merge of #3581 - euclio:camel-case, r=flip1995
fix breakage from rust-lang/rust#57088
2018-12-26 14:53:17 +00:00
Andy Russell
cd602c8b18
fix breakage from rust-lang/rust#57088 2018-12-25 16:11:28 -05:00
Matthias Krüger
7f5e17f3f1 fix a couple of ftrivial typos (NFC). 2018-12-25 18:22:34 +01:00
Matthias Krüger
5f0617b92f update CARGO_CLIPPY_HELP string to suggest tool lints. 2018-12-25 17:11:57 +01:00
Matthias Krüger
345fe6d6c6 rustc_tools_util: add readme 2018-12-25 17:03:36 +01:00
Matthias Krüger
6f5c0d2e0a rustc_tool_utils: expand Cargo.toml with a few keywords in preparation for crates.io release 2018-12-25 16:45:47 +01:00
Philipp Krones
197914439a
Fix macro detection in empty_loop.
Co-Authored-By: daxpedda <1645124+daxpedda@users.noreply.github.com>
2018-12-25 12:57:16 +01:00
daxpedda
a77bcadaa5
Changed macro_backtrace() to in_macro(). 2018-12-25 12:48:54 +01:00
daxpedda
b5587a894f
Fix lint detection on macro expansion. 2018-12-24 22:06:08 +01:00
bors
fc24fce73f Auto merge of #3576 - matthiaskrgr:rustup, r=oli-obk
rustup https://github.com/rust-lang/rust/pull/56992
2018-12-23 12:30:43 +00:00
Oliver Scherer
6db409fc0c
FIXME > TODO 2018-12-23 13:29:37 +01:00
Matthias Krüger
ce3e69da1c rustup https://github.com/rust-lang/rust/pull/56992 2018-12-23 10:42:06 +01:00
bors
52820e588f Auto merge of #3573 - Vlad-Shcherbina:map_clone_caveat, r=flip1995
Document map_clone known problems #498

(cherry picked from commit ada0d2c548)

This was lost in relicensing (057243f16b).
However, I [acknowledged](https://github.com/rust-lang/rust-clippy/issues/3099#issuecomment-416482309) relicensing so this cherry pick should be fine I guess.
2018-12-22 15:02:50 +00:00
bors
d9cc71fc42 Auto merge of #3341 - HMPerson1:possibly_missing_else, r=phansch
Teach `suspicious_else_formatting` about `if .. {..} {..}`

We essentially treat bare blocks `{..}` identically to `if .. {..}`, except for different lint messages.

Fixes #3044
2018-12-22 13:26:22 +00:00
Vlad-Shcherbina
d2c069de1e Document map_clone known problems #498
(cherry picked from commit ada0d2c548)
2018-12-22 13:44:35 +03:00
bors
19c7885c2a Auto merge of #3570 - muth:master, r=phansch
panic at map_unit_fn.rs:202 for map() without args

map_unit_fn.rs accessed map() arguments before type check which ensures type is Option or Result.

Boiled it down to a simple test case.

FWIW: Found this panic when running clippy against code which used a gtk::Window's map() fn inherited from gtk::WidgetExt   http://gtk-rs.org/docs/gtk/trait.WidgetExt.html#tymethod.map
2018-12-22 10:23:57 +00:00
bors
d3c747c752 Auto merge of #3569 - phansch:update_contributing, r=flip1995
Change contrib.md hierarchy, link to it from readme

'How Clippy works' and 'How to fix nightly failures' are not exactly part
of 'Writing code'.
2018-12-22 09:18:39 +00:00
Philipp Hansch
cef8f57082
Remove header link 2018-12-22 10:16:52 +01:00
Mark Nieweglowski
d395d45ca7 test: panic at map_unit_fn.rs:202 for map() without args 2018-12-22 01:06:02 -05:00
Mark Nieweglowski
a24853709a rm unused file map_unit_fn.stderr
There is no map_unit_fn.rs whose output would be diffed with map_unit_fn.stderr

map_unit_fn.stderr was renamed 8 months ago from option_map_unit_fn.stderr
but option_map_unit_fn.{stderr,rs} both remain and are in use.
2018-12-22 01:04:03 -05:00
Mark Nieweglowski
c6031221e0 panic at map_unit_fn.rs:202 for map() without args 2018-12-22 00:58:07 -05:00
Philipp Hansch
ff634e2350
Change contrib.md hierarchy, link to it from readme
'How Clippy works' and 'How to fix nightly failures' are not exactly part
of 'Writing code'.
2018-12-21 08:11:06 +01:00
HMPerson1
05ae391e2c
Workaround rust-lang/rust#43081 2018-12-20 22:45:44 -05:00
HMPerson1
88564b743e
Teach suspicious_else_formatting about if .. {..} {..} 2018-12-20 22:45:37 -05:00
bors
80c07d4c28 Auto merge of #3564 - alexcrichton:rustc-driver, r=phansch
Link to `rustc_driver` crate in plugin

This is in anticipation for rust-lang/rust#56987 where the
`rustc_driver` crate being linked in will be required to link correctly
against the compiler. In the meantime it should be harmless otherwise!
2018-12-20 05:52:04 +00:00
Alex Crichton
b5f6eb6e75 Link to rustc_driver crate in plugin
This is in anticipation for rust-lang/rust#56987 where the
`rustc_driver` crate being linked in will be required to link correctly
against the compiler. In the meantime it should be harmless otherwise!
2018-12-19 15:05:41 -08:00
bors
f067c5c1ec Auto merge of #3566 - kinnison:kinnison/typofix, r=phansch
mutex_atomic: Correct location of AtomicBool and friends

The AtomicBool, AtomicUsize, and friends, types live in the
`std::sync::atomic` module, rather than `std::atomic` as the lint
help text used to say.
2018-12-19 20:54:48 +00:00
Daniel Silverstone
5875ba3364 mutex_atomic: Correct location of AtomicBool and friends
The AtomicBool, AtomicUsize, and friends, types live in the
`std::sync::atomic` module, rather than `std::atomic` as the lint
help text used to say.
2018-12-19 20:47:50 +00:00
Peter Fürstenau
65c35333a4 Only print out question_mark lint when it actually triggered 2018-12-19 20:55:01 +01:00
Peter Fürstenau
18584698ee Add failing test 2018-12-19 20:50:18 +01:00
Peter Fürstenau
e722b1338e Reinserted commata 2018-12-19 20:31:08 +01:00
bors
691e5e76d3 Auto merge of #3552 - phansch:make_integration_tests_fail_again, r=oli-obk
Make integration tests fail on 'E0463'

cc #3523
2018-12-19 14:33:51 +00:00
bors
980bcd8c53 Auto merge of #3546 - matthiaskrgr:fix_install, r=oli-obk
Revert "Merge pull request #3257 from o01eg/remove-sysroot"

This reverts commit 041c49c1ed, reversing
changes made to 1df5766cbb.

The PR broke running a cargo-install'd clippy.
The installed clippy would not be able to find a crate for std.

Fixes #3523
Reopens #2874
2018-12-19 12:54:47 +00:00
bors
fdb4d983e2 Auto merge of #3563 - mikerite:readme-syspath, r=phansch
Update README local run command to specify syspath
2018-12-19 07:14:20 +00:00
Michael Wright
987f260543 Update README local run command to specify syspath 2018-12-19 06:13:43 +02:00
bors
61de562454 Auto merge of #3554 - klausi:module_name_repeat, r=oli-obk
chore(module_name_repeat): Rename stutter lint to module_name_repeat to avoid ableist language

See #3521
2018-12-18 13:28:12 +00:00
Peter Fürstenau
ee0856cbeb Recomend .as_ref()? in certain situations 2018-12-18 13:57:38 +01:00
Peter Fürstenau
8b0ea22885 Deduplicate some code? 2018-12-18 13:57:38 +01:00
bors
176778fe92 Auto merge of #3556 - lucasloisp:bool-ord-comparison, r=oli-obk
Implements lint for order comparisons against bool (#3438)

As described on issue #3438, this change implements linting for `>` and `<` comparisons against both `boolean` literals and between expressions.
2018-12-18 10:11:08 +00:00
bors
a637d55329 Auto merge of #3557 - detrumi:allow_asref_adjustments, r=oli-obk
Fix false positive in useless_asref

Fixes #3480
2018-12-18 08:37:44 +00:00