flip1995
6f01ecfefd
Fix question_mark lint+test
2019-04-01 20:37:05 +02:00
Félix Fischer
3cff06a0eb
Fix some test failures
2019-03-26 13:57:03 -03:00
Oliver Scherer
d020565ed2
Hacky rustup
2019-03-26 10:55:03 +01:00
Philipp Hansch
0452704978
cargo fmt
2019-03-19 06:57:41 +01:00
Philipp Hansch
f1d0858a8f
Add rustfix tests for mistyped_literal_suffix lint
...
This moves all `mistyped_literal_suffix` tests to their own file and
enables rustfix tests for them.
cc #3603 , #2038
Based on #3887
2019-03-19 06:55:42 +01:00
Philipp Hansch
4e51c980bc
Move some unreadable_literal
ui tests to correct file
...
The moved tests were part of `tests/ui/literals.rs` before. Now they are
placed in `tests/ui/unreadable_literal.rs`, which now also runs
`rustfix` on these 4 extra let statements.
2019-03-19 06:55:42 +01:00
bors
54e20519d2
Auto merge of #3886 - phansch:rustfix_useless_asref, r=flip1995
...
Enable rustfix for `useless_asref` lint tests
cc #3630
2019-03-15 09:43:29 +00:00
Philipp Hansch
0019ca5e4f
Enable rustfix for useless_asref
lint tests
2019-03-15 07:29:12 +01:00
bors
e7806413c6
Auto merge of #3883 - daxpedda:missing_docs_in_private_items, r=phansch
...
Add `doc(include = ...)` detection to `missing_docs_in_private_items`
The whole `missing documentation in crate` part doesn't have any tests. If I should add test cases tell me.
2019-03-15 06:18:28 +00:00
daxpedda
9061fd3199
Another test for missing crate documentation.
2019-03-14 19:38:41 +01:00
daxpedda
e1096e3310
Add a test for doc(include)
...
Tiny code improvement.
2019-03-14 19:33:06 +01:00
bors
bb41b16423
Auto merge of #3879 - phansch:rustfix_string_lit_as_bytes, r=flip1995
...
Run rustfix for string_lit_as_bytes tests
This moves the `string_lit_as_bytes` tests into a new file and enables
rustfix tests for them.
cc #3603 , #2038
2019-03-14 17:29:19 +00:00
bors
9df38117d9
Auto merge of #3877 - rink1969:3842, r=flip1995
...
casting integer literal to float is unnecessary
fix issue https://github.com/rust-lang/rust-clippy/issues/3842
2019-03-14 16:32:15 +00:00
rink1969
d9dd008e44
casting integer literal to float is unnecessary
2019-03-14 15:53:08 +08:00
Philipp Hansch
5e4a7eb1fc
UI test cleanup: Extract manual_memcpy tests
2019-03-14 07:26:47 +01:00
Philipp Hansch
67aad6c180
Run rustfix for string_lit_as_bytes tests
...
This moves the `string_lit_as_bytes` tests into a new file and enables
rustfix tests for them.
2019-03-14 06:59:30 +01:00
bors
8fc0a738e3
Auto merge of #3869 - taiki-e:use_self, r=flip1995
...
Fix `use_self` false positive on nested functions
Related to https://github.com/rust-lang/rust-clippy/pull/3640
The current `use_self` warns the following code.
```rust
#![warn(clippy::use_self)]
struct Foo {}
impl Foo {
fn bar() {
fn baz() -> Foo { //^ warning: unnecessary structure name repetition
Foo {} //^ warning: unnecessary structure name repetition
}
}
}
```
2019-03-12 12:09:56 +00:00
bors
3d31c2157a
Auto merge of #3794 - mikerite:fix-3739, r=phansch
...
Fix `boxed_local` suggestion
Don't warn about an argument that is moved into a closure.
ExprUseVisitor doesn't walk into nested bodies so use a new
visitor that collects the variables that are moved into closures.
Fixes #3739
2019-03-12 07:43:14 +00:00
bors
75bfa29533
Auto merge of #3871 - taiki-e:needless_continue, r=phansch
...
Fix `needless_continue` false positive
If the `continue` has a label, check it matches the label of the loop.
Fixes https://github.com/rust-lang/rust-clippy/issues/2329
2019-03-12 07:04:44 +00:00
Michael Wright
6937d5581a
Merge branch 'master' into fix-3739
2019-03-12 08:13:44 +02:00
Taiki Endo
1bc7da2fec
Fix needless_continue
false positive
2019-03-12 03:40:30 +09:00
Taiki Endo
187ce4c5ab
Fix use_self
false positive on nested functions
2019-03-11 23:24:49 +09:00
Taiki Endo
4896b259eb
Filter out proc_macro and proc_macro_attribute
2019-03-11 20:45:57 +09:00
flip1995
44c46d2059
Run rustfmt
2019-03-10 22:12:26 +01:00
flip1995
3282955238
Update tests
2019-03-10 22:07:10 +01:00
Alexander Regueiro
a7c0800938
Reblessed test outputs.
2019-03-10 18:13:15 +00:00
Alexander Regueiro
d2b85323ad
Addressed points raised in review.
2019-03-10 18:06:28 +00:00
Alexander Regueiro
d43966a176
Various cosmetic improvements.
2019-03-10 18:06:28 +00:00
Manish Goregaokar
038ec7f5d8
Move get_unwrap to restriction
...
fixes #3862
2019-03-09 13:48:06 -08:00
rchaser53
ae787d954e
fix missing a semicolon
2019-03-07 23:26:47 +09:00
Michael Wright
7b948232ba
Enable rustfix on unused_unit
tests
2019-03-07 08:26:53 +02:00
Michael Wright
fbcf7eefb9
Add [rustfmt::skip]
to unused_unit
test
2019-03-07 08:13:59 +02:00
Michael Wright
131c8f6bf2
Add [rustfmt::skip]
to doc_markdown
tests
2019-03-07 08:03:15 +02:00
Félix Fischer
ddc718087f
Renamed: Cyclomatic Complexity -> Cognitive Complexity
...
* Ran automatic naming update
* Formalized rename of `cyclomatic_complexity` to `cognitive_complexity`
** Added the rename to `lib.rs`
** Added rename test
* Added warning for deprecated key `cyclomatic_complexity_threshold` and tests for it
* Added deprecation status for Clippy's builtin attribute
* Updated tests for new builtin attribute renaming
2019-03-06 10:07:38 -03:00
Michael Wright
464ed58861
Ensure expect_fun_call
bad suggestion is fixed
...
Closes #3839
2019-03-06 07:00:05 +02:00
Philipp Hansch
15cba2e956
Fix missing_const_for_fn for impl trait methods
2019-03-05 08:11:55 +01:00
Philipp Hansch
b87f5bc55a
Don't trigger missing_const_for_fn in external macros
...
As reported in #3841 . Only fixes the part where it triggers on the
`derive`.
2019-03-04 22:56:33 +01:00
flip1995
c4eb780156
Add test for unknown Clippy attributes
2019-02-28 20:18:42 +01:00
Michael Wright
6e6e39b4a8
Add rustfmt::skip
to double_parens
tests
2019-02-28 08:02:45 +02:00
bors
ff2798840c
Auto merge of #3666 - detrumi:map-or-on-non-copy, r=flip1995
...
Only suggest map_or for copy types
Fixes #2686
2019-02-27 08:28:48 +00:00
Michael Wright
11682b4cd2
Add rustfmt::skip
to outer attr format tests
2019-02-27 07:41:07 +02:00
bors
6e8931c5f5
Auto merge of #3821 - g-bartoszek:redundant_closure-different-borrow-levels, r=oli-obk
...
do not trigger redundant_closure when there is a difference in borrow…
… level between closure parameter and "self", fixes #3802
2019-02-26 17:30:48 +00:00
Wilco Kusee
eb70a72459
Fix false negative
2019-02-26 17:29:36 +01:00
Wilco Kusee
fec6e55d1d
Attempt to fix false negative
2019-02-26 17:27:41 +01:00
Wilco Kusee
54ab22f6db
Only suggest map_or for copy types
2019-02-26 17:27:40 +01:00
bors
0957f7d3b7
Auto merge of #3817 - rust-lang:fix-bool_comparison-on-non-bool, r=oli-obk
...
Fix `bool_comparison` with non-`bool` expressions
Fixes #3703 .
It just moves around the type check that was already there for some comparison to all of them, because if one type isn't `bool`, none of those comparison can be simplified.
2019-02-26 15:51:40 +00:00
Grzegorz
a7f4d41a7d
do not trigger redundant_closure when there is a difference in borrow level between closure parameter and "self"
2019-02-26 12:12:27 +01:00
Michael Wright
7fd0fbf435
Add [rustfmt::skip] to formatting lint tests
2019-02-26 07:49:46 +02:00
mcarton
c0c0686a65
Fix bool_comparison
with non-bool
expressions
2019-02-25 22:31:16 +01:00
bors
50d9473856
Auto merge of #3808 - mikerite:useless-format-suggestions, r=oli-obk
...
Fix `useless_format` suggestions
2019-02-25 16:21:26 +00:00