Commit graph

4349 commits

Author SHA1 Message Date
Oliver Schneider
4ef7238b3e
Merge pull request #2601 from flip1995/export
Fix lintlib script
2018-03-31 20:55:33 +02:00
flip1995
2a52527a46
Fix lintlib script 2018-03-31 17:53:24 +02:00
Oliver Schneider
b7a0b97e97
Merge pull request #2590 from phansch/fix_another_false_positive
Fix false positive in empty_line_after_outer_attr
2018-03-30 13:13:45 +02:00
Philipp Hansch
db1ec44616
Handle nested block comments 2018-03-30 12:36:50 +02:00
Philipp Hansch
bb4af196be
Move empty_line_after_outer_attribute to nursery
From the clippy side it's difficult to detect empty lines between
an attributes and the following item because empty lines and comments
are not part of the AST. The parsing currently works for basic cases
but is not perfect and can cause false positives.

Maybe libsyntax 2.0 will fix some of the problems around attributes but
comments will probably be never part of the AST so we would still have
to do some manual parsing.
2018-03-30 12:36:50 +02:00
Philipp Hansch
b7929cafe1
Fix false positive in empty_line_after_outer_attr
Before, when you had a block comment between an attribute and the
following item like this:

```rust
\#[crate_type = "lib"]
/*

*/
pub struct Rust;
```

It would cause a false positive on the lint, because there is an empty
line inside the block comment.

This makes sure that basic block comments are detected and removed from
the snippet that was created before.
2018-03-30 12:36:50 +02:00
Manish Goregaokar
b45801ff19
Merge pull request #2593 from rust-lang-nursery/rustup
Rustup to rustc 1.26.0-nightly (ae544ee1c 2018-03-29)
2018-03-30 10:46:20 +02:00
Manish Goregaokar
b09e115404 Bump to 0.191 2018-03-30 10:38:42 +02:00
Manish Goregaokar
1d5dc3d180 Update changelog for 0.191 2018-03-30 10:38:35 +02:00
Manish Goregaokar
83748f5e48 Rustup to rustc 1.26.0-nightly (ae544ee1c 2018-03-29) 2018-03-30 10:35:51 +02:00
Manish Goregaokar
9887b972d4
Merge pull request #2589 from rust-lang-nursery/rangearg
Move RangeArgument
2018-03-29 16:21:45 +02:00
Oliver Schneider
a47734c41d
Merge pull request #2579 from rust-lang-nursery/lint_audit_mcve
lint audit: Implementation + move one lint
2018-03-29 14:34:21 +02:00
Oliver Schneider
c1bbc173da
Address review comments 2018-03-29 13:41:53 +02:00
Manish Goregaokar
b75618206c Move RangeArgument 2018-03-29 13:13:27 +02:00
Oliver Schneider
82e771d7dc
Document lint groups 2018-03-29 13:04:52 +02:00
Oliver Schneider
411d9c7651
Merge pull request #2585 from bjgill/use-check-manifest-handling
Use cargo check's manifest handling
2018-03-29 07:19:00 +02:00
Benjamin Gill
8db845c189
Delete all code for handling manifest path
Now that we're using cargo check, we can stop needing to find out the
manifest path ourselves. Instead, we can delegate to cargo check, which
is perfectly capable of working out for itself what needs to be built.

This fixes #1707 and #2518.

Note that this PR will change the output. We will no longer output `bin:
foo` before each crate. This a bit unfortunate. However, given that
we're now going to be building in parallel (which is *much* faster), I
think this is acceptable - we'll be no worse than cargo itself.
2018-03-28 23:27:49 +01:00
Oliver Schneider
eafb9fe8df
Update test suite 2018-03-28 23:49:32 +02:00
Oliver Schneider
d6344c47e3
Categorize all the lints! 2018-03-28 15:24:26 +02:00
Oliver Schneider
e34a8553b0
Merge pull request #2582 from rust-lang-nursery/clippy_aint_no_compiler
Use cargo check instead of cargo rustc
2018-03-28 12:04:18 +02:00
Oliver Schneider
66a98d2658
Use cargo check instead of cargo rustc 2018-03-28 11:50:17 +02:00
Oliver Schneider
ef9fdbb8a9
Implementation + move one lint 2018-03-27 17:13:55 +02:00
Oliver Schneider
9b10c4be8c
Undo current_dir -> CARGO_MANIFEST_DIR move 2018-03-27 13:00:02 +02:00
Oliver Schneider
96d5af36f8
Version bump 2018-03-27 12:14:46 +02:00
Oliver Schneider
b6e2c47df0
Merge pull request #2572 from flip1995/immut_while
Fix check of immutable condition in closure
2018-03-27 07:07:27 +02:00
Oliver Schneider
29c449e644
Merge pull request #2578 from mikerite/fix_issue_2397_pr_2
Fix enum_glob_use false positives
2018-03-27 07:07:01 +02:00
Michael Wright
546d2fec29 Fix enum_glob_use false positives
Closes #2397.

This checks the def of the `ItemUse` path instead of checking the
capitalization of the path segements. It was noted that this def would
sometimes be `Def::Mod` instead of `Def::Enum` but it seems correct now.
2018-03-27 06:34:11 +02:00
flip1995
7d29075132
Skip the mutation in while body case for closures 2018-03-27 02:13:06 +02:00
flip1995
d458f22d89
Fix check of immutable condition in closure 2018-03-27 01:21:25 +02:00
Oliver Schneider
b01b0083ba
Merge pull request #2576 from kimsnj/infinite_loop
while_immutable_condition: fix handling of self
2018-03-27 00:06:16 +02:00
Karim Snj
737247e50e while_immutable_condition: limit suggestion span to condition 2018-03-26 23:24:57 +02:00
Karim Snj
85bcaad412 while_immutable_condition: fix handling of self 2018-03-26 23:16:54 +02:00
Oliver Schneider
f7c4bb69d2
Merge pull request #2577 from phansch/false_positive_empty_line_after_outer_attr_with_enum
Fix false positive in empty_line_after_outer_attribute
2018-03-26 22:50:48 +02:00
Philipp Hansch
034c81b761
Fix false positive in empty_line_after_outer_attribute
`empty_line_after_outer_attribute` produced a false positive warning when
deriving `Copy` and/or `Clone` for an item.

It looks like the second point in [this comment][that_comment] is related,
as the attribute that causes the false positive has a path of
`rustc_copy_clone_marker`.

Fixes #2475

[that_comment]: https://github.com/rust-lang/rust/issues/35900#issuecomment-245978831
2018-03-26 21:57:42 +02:00
Oliver Schneider
eafd090108
Merge pull request #2575 from rust-lang-nursery/oli-obk-patch-1
Update needless_lifetimes_impl_trait.rs
2018-03-26 07:22:32 +02:00
Oliver Schneider
1aaeb3f16b
Update needless_lifetimes_impl_trait.rs 2018-03-26 07:05:46 +02:00
Oliver Schneider
9fb63d5fc4
Merge pull request #2574 from mark-i-m/i128
i128 is stabilizing
2018-03-26 07:04:42 +02:00
Mark Mansi
e9f6a7c72f whitespace 2018-03-25 21:26:10 -05:00
Mark Mansi
e2d7ef9972 attempt fix stderr 2018-03-25 21:17:38 -05:00
Mark Mansi
f25d4fd253 make it pass for now 2018-03-25 21:04:05 -05:00
Mark Mansi
a4d869ca76 i128 is stable 2018-03-25 20:35:23 -05:00
Mark Mansi
748ad9fb4b i128 is stable 2018-03-25 20:34:44 -05:00
Oliver Schneider
2dedbdc858
Merge pull request #2570 from CYBAI/update-readme
Update configuration for leading dot filename
2018-03-25 23:11:12 +02:00
CYBAI
cb9d1727fe Update configuration for leading dot filename 2018-03-25 16:57:15 +08:00
Oliver Schneider
d7d7c12fe1
Merge pull request #2569 from rust-lang-nursery/oli-obk-patch-1
Undo a temporary fix for a cargo bug
2018-03-25 10:41:39 +02:00
Oliver Schneider
bef1afac5b
Undo a temporary fix for a cargo bug
Fixes #2566
2018-03-25 08:52:00 +02:00
Oliver Schneider
09725c8c0d
Merge pull request #2565 from mikerite/issue_2420_tests_pr
Add tests to ensure that issue #2420 is resolved
2018-03-24 15:15:03 +01:00
Michael Wright
2b68f00722 Add tests to ensure that issue #2420 is resolved
The issue was probably fixed by ff32d5f7. Closes #2420.
2018-03-23 20:26:52 +02:00
llogiq
589704e1dc
Merge pull request #2561 from mikerite/walk_ptrs_ty_depth_pr
Minor refactoring (walk_ptrs_ty_depth)
2018-03-21 20:55:35 +01:00
Michael Wright
70d8f85e7e Minor refactoring (walk_ptrs_ty_depth)
Replace `walk_ptrs_ty_depth` with `walk_ptrs_ty` when the depth value is
ignored.
2018-03-21 20:10:10 +02:00