Commit graph

5385 commits

Author SHA1 Message Date
bors
e3270c6f47 Auto merge of #3702 - phansch:changechangelog, r=matthiaskrgr
Remove unsafe_vector_initialization from added lints

It was deprecated before it reached a stable release,
no need to include it.
2019-01-26 11:58:35 +00:00
Philipp Hansch
59e176d4af
Remove unsafe_vector_initialization from added lints
It was deprecated before it reached a stable release,
no need to include it.
2019-01-26 12:50:40 +01:00
bors
33a0fe7b2c Auto merge of #3690 - mikerite:fix-3630-expect-fun-call, r=phansch
Fix `expect_fun_call` lint suggestions

This commit corrects some bad suggestions produced by the
`expect_fun_call` lint and enables `rust-fix` checking on the tests.

Addresses #3630
2019-01-26 10:57:39 +00:00
bors
b1b55e8559 Auto merge of #3701 - mikerite:fix-3118, r=phansch
Fix dogfood tests on Appveyor

This introduces a work-around for a bug in rustup.rs when excuting
cargo from a custom toolchain. Instead of trusting rustup to
invoke cargo from one of the release channels we just invoke
nightly cargo directly.
2019-01-26 09:56:07 +00:00
Michael Wright
18cacbabb4 Incorporate review suggestions 2019-01-26 11:55:54 +02:00
Michael Wright
94a6eb0695 Fix dogfood tests on Appveyor
This introduces a work-around for a bug in rustup.rs when excuting
cargo from a custom toolchain. Instead of trusting rustup to
invoke cargo from one of the release channels we just invoke
nightly cargo directly.
2019-01-26 11:10:13 +02:00
bors
a6b34861c4 Auto merge of #3698 - sorin-davidoi:fix-common-metadata-no-deps, r=oli-obk
chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1

Closes https://github.com/rust-lang/rust-clippy/issues/3692.
2019-01-25 23:01:06 +00:00
Sorin Davidoi
dc3bee7962 test(versioncheck): Use .no_deps() 2019-01-25 21:53:44 +01:00
Sorin Davidoi
53ce28a969 test(versioncheck): Fix version equality check 2019-01-25 21:53:44 +01:00
Sorin Davidoi
1fe0cf6f07 chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1
Closes https://github.com/rust-lang/rust-clippy/issues/3692.
2019-01-25 21:53:44 +01:00
bors
8a02512ab3 Auto merge of #3699 - matthiaskrgr:itertools, r=oli-obk
dependencies: update itertools from 0.7 to 0.8
2019-01-25 20:00:20 +00:00
Matthias Krüger
873fe11ca5 dependencies: update itertools from 0.7 to 0.8 2019-01-25 20:25:14 +01:00
bors
aca1b81120 Auto merge of #3691 - phansch:update_changelog, r=oli-obk
Update changelog with all changes since 0.0.212

This updates the changelog with all notable and user-facing changes since
0.0.212 has been released. I decided to group the changes by the Rust version
they are included in, as that's what makes the most sense to users.

Whenever a new rust version is released, we will have to go through the list
of commits and then update the changelog with the relevant changes.

[Rendered](https://github.com/rust-lang/rust-clippy/pull/3691/files?short_path=4ac32a7#diff-4ac32a78649ca5bdd8e0ba38b7006a1e)
2019-01-25 17:47:54 +00:00
Philipp Hansch
1adc35703f
Add script to fetch GitHub PRs between two commits 2019-01-25 18:07:50 +01:00
bors
c5325063c8 Auto merge of #3694 - phansch:fixed, r=phansch
gitattributes: Treat .fixed files as rust files

This way GitHub treats them as Rust code 🦀 👀
2019-01-25 06:43:24 +00:00
Philipp Hansch
fffb2691a3
gitattributes: Treat .fixed files as rust files 2019-01-25 07:11:10 +01:00
bors
f1753522d8 Auto merge of #3693 - phansch:rustup, r=matthiaskrgr
Rustup

Due to https://github.com/rust-lang/rust/pull/51285
2019-01-24 19:40:31 +00:00
Philipp Hansch
0bac0149e7
Rustup
Due to https://github.com/rust-lang/rust/pull/51285
2019-01-24 20:32:18 +01:00
Philipp Hansch
1e4f44853c
Update changelog with all changes since 0.0.212 2019-01-24 20:14:33 +01:00
Michael Wright
5284b95a06 Fix expect_fun_call lint suggestions
This commit corrects some bad suggestions produced by the
`expect_fun_call` lint and enables `rust-fix` checking on the tests.

Addresses #3630
2019-01-24 06:58:53 +02:00
bors
99c5388ce6 Auto merge of #3582 - Arkweid:add-lints-aseert-checks, r=flip1995
Add assert(true) and assert(false) lints

This PR add two lints on assert!(true) and assert!(false).
#3575
2019-01-23 17:42:30 +00:00
A.A.Abroskin
c771f339d7 allow assertions_on_constants for collapsible_if and missing_test_files 2019-01-23 17:58:33 +03:00
A.A.Abroskin
f11d993c0f Merge branch 'master' into add-lints-aseert-checks
* master: (58 commits)
  Rustfmt all the things
  Don't make decisions on values that don't represent the decision
  Improving comments.
  Rustup
  Added rustfix to the test.
  Improve span shortening.
  Added "make_return" and "blockify" convenience methods in Sugg and used them in "needless_bool".
  Actually check for constants.
  Fixed potential mistakes with nesting. Added tests.
  formatting fix
  Update clippy_lints/src/needless_bool.rs
  formatting fix
  Fixing typo in CONTRIBUTING.md
  Fix breakage due to rust-lang/rust#57651
  needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement
  Fix automatic suggestion on `use_self`.
  Remove negative integer literal checks.
  Fix `implicit_return` false positives.
  Run rustfmt
  Fixed breakage due to rust-lang/rust#57489
  ...
2019-01-23 11:36:12 +03:00
bors
a069320fd7 Auto merge of #3684 - g-bartoszek:sugg-snippet-modifications, r=phansch
"make_return" and "blockify" convenience methods, fixes #3683

…ed them in "needless_bool".
2019-01-22 20:18:11 +00:00
bors
a40d8e4479 Auto merge of #3679 - daxpedda:use_self, r=phansch
Fix automatic suggestion on `use_self`.

In an example like this:
```rust
impl Example {
    fn fun_1() { }
    fn fun_2() {
        Example::fun_1();
    }
}
```
Clippy tries to replace `Example::fun_1` with `Self`, loosing `::fun_1` in the process, it should rather try to replace `Example` with `Self`.

**Question**
- There may be other paths that need the same treatment, but I'm not sure I understand them fully:
  - e648adf086/clippy_lints/src/use_self.rs (L94-L96)
  - e648adf086/clippy_lints/src/use_self.rs (L225-L229)
2019-01-22 19:18:39 +00:00
bors
280069ddc7 Auto merge of #3685 - rust-lang:rustup, r=flip1995
Rustup
2019-01-22 16:07:32 +00:00
Oliver Scherer
d6c806378e Rustfmt all the things 2019-01-22 16:27:42 +01:00
Oliver Scherer
38cdf63acf Don't make decisions on values that don't represent the decision 2019-01-22 15:28:51 +01:00
daxpedda
42d5a07f0c
Improving comments. 2019-01-22 15:23:45 +01:00
Oliver Scherer
3168023cc8 Rustup 2019-01-22 15:17:05 +01:00
daxpedda
e6f2239bc3
Added rustfix to the test. 2019-01-22 15:16:54 +01:00
Philipp Krones
e70f9456fc
Improve span shortening.
Co-Authored-By: daxpedda <1645124+daxpedda@users.noreply.github.com>
2019-01-22 14:43:59 +01:00
Grzegorz Bartoszek
0f5c43a722 Added "make_return" and "blockify" convenience methods in Sugg and used them in "needless_bool". 2019-01-22 14:07:53 +01:00
bors
9d5b148648 Auto merge of #3677 - daxpedda:integer_arithmetic, r=oli-obk
Remove negative integer literal checks.

Fixes #3678.
2019-01-21 15:07:22 +00:00
daxpedda
87d24e1fc9
Actually check for constants. 2019-01-21 13:59:49 +01:00
bors
e0bcec717a Auto merge of #3676 - daxpedda:implicit_return, r=oli-obk
Fix `implicit_return` false positives.

Fixes the following false positives:
- linting on `if let` without `else` in a `loop` even with a present `return`
- linting on `unreachable!()`
2019-01-21 12:25:45 +00:00
daxpedda
2e0977f3b4
Fixed potential mistakes with nesting. Added tests. 2019-01-21 13:06:32 +01:00
bors
54978a571c Auto merge of #3680 - g-bartoszek:needless-bool-else-if-brackets, r=oli-obk
needless bool lint suggestion is wrapped in brackets if it is an "els…

…e" clause of an "if-else" statement
2019-01-21 11:47:06 +00:00
Grzegorz Bartoszek
34785a12f4 formatting fix 2019-01-21 12:04:25 +01:00
Oliver Scherer
4532073a29
Update clippy_lints/src/needless_bool.rs
Co-Authored-By: g-bartoszek <grzegorz.bartoszek@thaumatec.com>
2019-01-21 11:41:33 +01:00
Grzegorz Bartoszek
0a0792e535 formatting fix 2019-01-21 11:14:34 +01:00
bors
1838bfe5a9 Auto merge of #3681 - rmcteggart-r7:master, r=matthiaskrgr
Fixing typo in CONTRIBUTING.md

Noticed small typo in CONTRIBUTING readme when working on another issue
2019-01-20 22:21:00 +00:00
bors
5b64f6875e Auto merge of #3675 - mikerite:fix-build-20190120, r=matthiaskrgr
Fix build 20190120
2019-01-20 21:52:18 +00:00
rmcteggart-r7
d17c3d99d0 Fixing typo in CONTRIBUTING.md 2019-01-20 21:25:36 +00:00
Michael Wright
a747dbb04f Fix breakage due to rust-lang/rust#57651 2019-01-20 22:56:07 +02:00
Grzegorz Bartoszek
adce3ef966 needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement 2019-01-20 16:15:00 +01:00
daxpedda
13b5ea4223
Fix automatic suggestion on use_self. 2019-01-20 14:50:26 +01:00
daxpedda
0555ca1c2d
Remove negative integer literal checks. 2019-01-20 14:18:31 +01:00
daxpedda
2183cfcc13
Fix implicit_return false positives. 2019-01-20 13:45:22 +01:00
Michael Wright
8747691bea Run rustfmt 2019-01-20 12:49:45 +02:00