Commit graph

4262 commits

Author SHA1 Message Date
Oliver Schneider
475959d905
Merge pull request #2681 from phansch/fix_latest_nightly_breakage
Fix latest nightly breakage
2018-04-19 08:28:10 +02:00
Oliver Schneider
f84cc2cc36
Merge pull request #2683 from rust-lang-nursery/rustup
Rustup
2018-04-19 06:46:41 +02:00
Philipp Hansch
a854874e6a
Fix latest nightly breakage
I'm not sure if there are better ways to use the RwLock API, though. But
it seems to work.
2018-04-18 20:25:43 +02:00
Philipp Hansch
0c665f4a31
Merge pull request #2675 from phansch/mention_irc_in_contributing_md
Add intro and mention IRC in CONTRIBUTING.md
2018-04-17 22:26:01 +02:00
Oliver Schneider
f786a36949
Rustup 2018-04-17 10:52:25 +02:00
Philipp Hansch
fe426b7c51
Add intro and mention IRC in CONTRIBUTING.md
This is partly taken from the [rustfmt CONTRIBUTING.md][contrib].

[contrib]: https://github.com/rust-lang-nursery/rustfmt/blob/master/Contributing.md
2018-04-17 08:33:22 +02:00
Oliver Schneider
ae3213747d
Merge pull request #1467 from philipturnbull/option_map_nil_fn
Lint `Option.map(f)` where f returns unit
2018-04-15 16:14:25 +02:00
Philipp Hansch
26b9911e07
Refactor out enum and address nits 2018-04-15 15:37:11 +02:00
Oliver Schneider
9dc9487567
Version bump 2018-04-15 15:01:48 +02:00
Oliver Schneider
486dc5c070
Merge pull request #2650 from thekidxp/fixEmptyPrintln
fixEmptyPrintln
2018-04-15 14:30:45 +02:00
MSI\Stew's Laptop
d175c797e5
fixing error message for empty println macro 2018-04-15 14:00:28 +02:00
Philipp Hansch
4f4e20c561
Also lint Result.map for unit returns 2018-04-15 13:59:57 +02:00
Philipp Hansch
8307a899e9
Rename option_map_unit_fn to map_unit_fn 2018-04-15 13:01:10 +02:00
Philipp Hansch
d54f70f1f6
Generate let binding variable name for some cases
Given a map call like `x.field.map ...` the suggestion will contain:
`if let Some(x_field) ...`

Given a map call like `x.map ...` the suggestion will contain:
`if let Some(_x) ...`

Otherwise it will suggest: `if let Some(_) ...`
2018-04-15 13:01:10 +02:00
Philipp Hansch
d87385b406
Use approximate_suggestion for non-reducible closures 2018-04-15 13:01:10 +02:00
Philipp Hansch
7de707fdba
Remove further semicolon reduction 2018-04-15 13:01:10 +02:00
Philipp Hansch
db60c67c5b
Allow new lint in ui/eta.rs 2018-04-15 13:01:09 +02:00
Philipp Hansch
bcc335fc9c
Move test to new UI test system 2018-04-15 13:01:09 +02:00
Philipp Hansch
a3ff21f4d6
Rename lint to option_map_unit_fn
Rust does not have nil.
2018-04-15 13:01:09 +02:00
Philipp Hansch
fbd71f901f
Use declare_clippy_lint and 'complexity' category 2018-04-15 13:01:09 +02:00
Philipp Hansch
ca60e8a2a0
Cleanup misc::check_nan
This was a bit messed up after a bigger rebase.
2018-04-15 13:01:09 +02:00
Philipp Hansch
991a30237a
Make it compile again 2018-04-15 13:01:09 +02:00
Phil Turnbull
d0bdfe5ce3
Handle non-trivial nil closures
`reduce_nil_closure` mixed together a) 'is this a nil closure?' and b) 'can it
be reduced to a simple expression?'. Split the logic into two functions so we
can still generate a basic warning when the closure can't be simplified.
2018-04-15 13:01:09 +02:00
Phil Turnbull
2f52d1d568
Return Spans instead of Cow<&str>'s 2018-04-15 13:01:09 +02:00
Phil Turnbull
30f2480fd8
Lint closures that return nil 2018-04-15 13:01:09 +02:00
Phil Turnbull
302f5d05f5
Lint Option.map(f) where f never returns 2018-04-15 13:01:09 +02:00
Phil Turnbull
e5ecbb55ee
Lint Option.map(f) where f returns nil 2018-04-15 13:01:09 +02:00
Oliver Schneider
b2e4b88d18
Merge pull request #2662 from mikerite/issue_2546
Fix useless_format false negative
2018-04-15 11:57:57 +02:00
Oliver Schneider
cefb7b0f58
Merge pull request #2670 from mikerite/fix_compilation_20180415
Fix compilation for nightly 2018-04-15
2018-04-15 11:57:01 +02:00
Michael Wright
d171e8987e Fix clippy error 2018-04-15 05:20:30 +02:00
Michael Wright
a9c8d1bd90 Fix compilation for nightly 2018-04-15
This only fixes compilation and the build. It's possible that the `author`
and `inspector` lints are broken but there are no failing tests.

Closes #2667
2018-04-15 05:01:43 +02:00
Oliver Schneider
fc8e35884b
Merge pull request #2669 from senden9/patch-1
Fix Markdown link syntax in lint doc
2018-04-14 12:18:18 +02:00
Stefano Probst
01faa906d2
Fix Markdown link syntax in lint doc
Currently this link is wrong rendered. See https://rust-lang-nursery.github.io/rust-clippy/v0.0.193/index.html#iter_next_loop
2018-04-14 11:35:52 +02:00
Philipp Hansch
8c9ed704c6
Merge pull request #2668 from phansch/run_remark_on_all_markdown_files
Run remark-lint on all markdown files in root
2018-04-13 21:09:07 +02:00
Philipp Hansch
0995e923f0
Run remark-lint on all markdown files in root 2018-04-13 20:54:42 +02:00
Philipp Hansch
a936b6d95d
Merge pull request #2664 from phansch/move_unnecessary_fold_ui_tests
Move unnecessary_fold UI tests to separate file
2018-04-12 22:32:45 +02:00
Philipp Hansch
dfde407f0d
Move unnecessary_fold UI tests to separate file 2018-04-12 22:16:43 +02:00
Michael Wright
c7ad71ccf2 Fix clippy warnings 2018-04-12 08:50:42 +02:00
Michael Wright
6ae617b313 Fix useless_format false negative
Closes #2546
2018-04-12 08:21:03 +02:00
Oliver Schneider
8ec61a613a
Merge pull request #2661 from devonhollowood/ptr-ptr-casts
Replace `misaligned_transmute` lint
2018-04-11 13:23:15 +02:00
Devon Hollowood
b77d74030b Deprecate misaligned_transmute 2018-04-11 02:50:04 -07:00
Devon Hollowood
c6bc682325 Fix misaligned_transmute lint
This is done by adding two new lints: cast_ptr_alignment and
transmute_ptr_to_ptr. These will replace misaligned_transmute.
2018-04-11 02:17:59 -07:00
Oliver Schneider
c5f31077e8
Merge pull request #2660 from phansch/fix_travis
Fix travis.yml
2018-04-11 09:06:24 +02:00
Philipp Hansch
d8cf11cdf2
Fix travis.yml
For some reason #2659 was an invalid .travis.yml and this reverts that
part of the commit that changes the .travis.yml.

It resulted in travis not starting jobs. There should be a travis build
again for this PR.
2018-04-11 08:47:40 +02:00
Philipp Hansch
498d862062
Merge pull request #2659 from phansch/debug_deployment_issues
Debug deployment script issues
2018-04-11 08:40:42 +02:00
Philipp Hansch
bdba9c14e7
Add set -x for debugging 2018-04-11 08:23:02 +02:00
Philipp Hansch
8fbeaa81d8
Debug deployment script issues
This prints some more information during the docs deployment.
2018-04-11 08:13:59 +02:00
Oliver Schneider
c067bc3cd0
Merge pull request #2655 from rust-lang-nursery/oli-obk-patch-1
Explain nursery lints
2018-04-10 19:44:43 +02:00
Oliver Schneider
ba1be0d53b
Explain nursery lints
fixes #2652
2018-04-10 13:50:44 +02:00
Oliver Schneider
94e897851b
Merge pull request #2654 from killercup/feature/lint-groups-in-docs
Show/Filter by lint groups in docs
2018-04-10 13:09:27 +02:00