]>
git.lizzy.rs Git - rust.git/log
Philipp Hansch [Thu, 15 Aug 2019 15:42:05 +0000 (17:42 +0200)]
Remove publishing things
Clippy is no longer published via crates.io, so these docs and the
script are not needed anymore.
bors [Wed, 14 Aug 2019 19:26:19 +0000 (19:26 +0000)]
Auto merge of #4383 - phansch:update_changelog, r=Manishearth
Update changelog for Rust 1.37
Also updates the rest of the changelog wrt. to the latest releases and commit hashes.
changelog: none
[Rendered](https://github.com/phansch/rust-clippy/blob/update_changelog/CHANGELOG.md#rust-137)
Philipp Hansch [Wed, 14 Aug 2019 18:39:01 +0000 (20:39 +0200)]
Fix links to lints in changelog
Philipp Hansch [Wed, 14 Aug 2019 18:20:51 +0000 (20:20 +0200)]
Update changelog for Rust 1.37
Also updates the rest of the changelog wrt. to the latest releases.
bors [Wed, 14 Aug 2019 13:07:19 +0000 (13:07 +0000)]
Auto merge of #4379 - matthiaskrgr:url_dep, r=phansch
update url dependency from 1.7.0 to 2.1.0
changelog: none
bors [Wed, 14 Aug 2019 11:37:10 +0000 (11:37 +0000)]
Auto merge of #4363 - phansch:fix_lint_deprecation, r=flip1995
Update lint deprecation for tool lints
changelog: Allow tool lints (`clippy::*`) to be deprecated
Our lint deprecation previously didn't work for tool lints, because
`register_removed` was registering lints to be removed _without_ the
`clippy` prefix.
Fixes #4349
Matthias Krüger [Wed, 14 Aug 2019 11:04:17 +0000 (13:04 +0200)]
update url dependency from 1.7.0 to 2.1.0
bors [Wed, 14 Aug 2019 10:59:36 +0000 (10:59 +0000)]
Auto merge of #4369 - mikerite:fix-4293, r=flip1995
Fix `wrong_self_convention` issue
Resolves #4293
changelog: Fix `wrong_self_convention` issue
bors [Wed, 14 Aug 2019 09:36:16 +0000 (09:36 +0000)]
Auto merge of #4231 - jeremystucki:flat-map, r=flip1995
Implement flat_map lint
Fixes #4224
changelog: New Lint `flat_map_identity` to detect unnecessary calls to `flat_map`
bors [Wed, 14 Aug 2019 08:54:07 +0000 (08:54 +0000)]
Auto merge of #4378 - flip1995:ui-toml, r=flip1995
Update ui-toml tests
changelog: none
flip1995 [Wed, 14 Aug 2019 07:58:00 +0000 (09:58 +0200)]
Update ui-toml tests
Jeremy Stucki [Wed, 14 Aug 2019 05:36:37 +0000 (07:36 +0200)]
Merge branch 'origin/master' into flat-map
Jeremy Stucki [Tue, 13 Aug 2019 19:50:52 +0000 (21:50 +0200)]
Update test
Jeremy Stucki [Tue, 13 Aug 2019 19:50:42 +0000 (21:50 +0200)]
Use correct span
Jeremy Stucki [Tue, 13 Aug 2019 06:02:59 +0000 (08:02 +0200)]
Add 'unnecessary_flat_map.fixed'
Jeremy Stucki [Mon, 12 Aug 2019 19:47:12 +0000 (21:47 +0200)]
Run 'update_lints'
Jeremy Stucki [Mon, 12 Aug 2019 19:42:57 +0000 (21:42 +0200)]
Use 'span_lint_and_sugg'
Jeremy Stucki [Mon, 12 Aug 2019 18:35:50 +0000 (20:35 +0200)]
Minor refactoring
Philipp Hansch [Mon, 12 Aug 2019 17:30:06 +0000 (19:30 +0200)]
Add deprecation tests for deprecated tool lints
Philipp Hansch [Mon, 12 Aug 2019 17:26:16 +0000 (19:26 +0200)]
Move old lint deprecation tests to deprecated_old.rs
Philipp Hansch [Mon, 12 Aug 2019 05:27:01 +0000 (07:27 +0200)]
Fix invalid_ref deprecation
Philipp Hansch [Mon, 12 Aug 2019 05:28:07 +0000 (07:28 +0200)]
Keep old deprecated lints deprecated as non-tool, too
Philipp Hansch [Fri, 9 Aug 2019 05:50:25 +0000 (07:50 +0200)]
Update lint deprecation for tool lints
Our lint deprecation previously didn't work for tool lints, because
`register_removed` was registering lints to be removed _without_ the
`clippy` prefix.
bors [Mon, 12 Aug 2019 11:05:49 +0000 (11:05 +0000)]
Auto merge of #4373 - flip1995:filter_changelog_none, r=phansch
Filter out PRs with changelog: none
cc #4372
Filtering out the `changelog: none` merge commits, to unclutter the output.
changelog: none
Jeremy Stucki [Mon, 12 Aug 2019 08:52:09 +0000 (10:52 +0200)]
Change lint type from 'pedantic' → 'complexity'
flip1995 [Mon, 12 Aug 2019 07:38:52 +0000 (09:38 +0200)]
Filter out PRs with changelog: none
Jeremy Stucki [Mon, 12 Aug 2019 05:53:22 +0000 (07:53 +0200)]
Run 'update_lints'
bors [Mon, 12 Aug 2019 05:15:16 +0000 (05:15 +0000)]
Auto merge of #4365 - lukas-code:async_new_ret_no_self, r=flip1995
new_ret_no_self: allow Self in inner type for impl Trait return types
Check the inner types of associated types of a trait when checking for Self in the return type of a `new` method. This means that the following will no longer warn:
```rust
trait Trait {
type Inner;
}
struct S;
impl S {
fn new() -> impl Trait<Inner = Option<Self>> {
struct TraitImpl;
impl Trait for TraitImpl {
type Inner = Option<S>;
}
TraitImpl
}
}
```
```rust
#![feature(async_await)]
struct Connection;
impl Connection {
async fn new() -> Result<Self, ()> {
Ok(S)
}
}
```
closes #4359
changelog: fix `new_ret_no_self` lint for async `new` functions.
bors [Mon, 12 Aug 2019 04:38:50 +0000 (04:38 +0000)]
Auto merge of #4367 - flip1995:doc_edition_2018_tests, r=phansch
Document how to write tests requiring the 2018 edition
[Rendered](https://github.com/flip1995/rust-clippy/blob/doc_edition_2018_tests/doc/adding_lints.md#Edition-2018-tests)
cc #4365
changelog: none
Jeremy Stucki [Sun, 11 Aug 2019 20:18:58 +0000 (22:18 +0200)]
Update rustdoc
Jeremy Stucki [Sun, 11 Aug 2019 19:02:01 +0000 (21:02 +0200)]
Refactor if_chain
Co-authored-by: Philipp Krones <hello@philkrones.com>
bors [Sun, 11 Aug 2019 18:42:16 +0000 (18:42 +0000)]
Auto merge of #4370 - vallentin:master, r=flip1995
Fixed repeated word
changelog: none
Jeremy Stucki [Sun, 11 Aug 2019 18:34:25 +0000 (20:34 +0200)]
Rename 'flat_map' → 'flat_map_identity'
Jeremy Stucki [Sun, 11 Aug 2019 17:51:43 +0000 (19:51 +0200)]
Handle calls with 'std::convert::identity'
Jeremy Stucki [Sun, 11 Aug 2019 17:22:40 +0000 (19:22 +0200)]
Merge branch 'origin/master' into flat-map
Vallentin [Sun, 11 Aug 2019 10:56:30 +0000 (12:56 +0200)]
Fixed repeated word
bors [Sun, 11 Aug 2019 09:08:22 +0000 (09:08 +0000)]
Auto merge of #4368 - RalfJung:invalid_ref, r=oli-obk
deprecate invalid_ref lint
This fixes the `invalid_ref` lint test to no longer fail when https://github.com/rust-lang/rust/pull/63346/ lands. I also fixed the lint itself, because its wording made no sense: there is no "reference to zeroed/uninitialized memory" here.
changelog: none
Ralf Jung [Sun, 11 Aug 2019 09:02:25 +0000 (11:02 +0200)]
update_lints
Ralf Jung [Sun, 11 Aug 2019 07:30:20 +0000 (09:30 +0200)]
deprecate invalid_ref lint
Michael Wright [Sat, 10 Aug 2019 04:01:15 +0000 (06:01 +0200)]
Fix `wrong_self_convention` issue
Resolves #4293
Michael Wright [Sat, 10 Aug 2019 04:00:27 +0000 (06:00 +0200)]
Simplify `wrong_self_convention` code
Use actual types instead of hir types.
Michael Wright [Sat, 10 Aug 2019 03:58:52 +0000 (05:58 +0200)]
Rename implitem to impl_item
`impl_item` is proper snake case and used everywhere else.
Lukas Markeffsky [Fri, 9 Aug 2019 21:15:49 +0000 (23:15 +0200)]
fixed tests (again) and added a test that should actually cause a warning for new_ret_no_self
Lukas Markeffsky [Fri, 9 Aug 2019 17:47:25 +0000 (19:47 +0200)]
removed unused imports #2
Lukas Markeffsky [Fri, 9 Aug 2019 17:44:20 +0000 (19:44 +0200)]
removed unused imports
Lukas Markeffsky [Fri, 9 Aug 2019 17:19:49 +0000 (19:19 +0200)]
upgrade test to rust 2018
flip1995 [Fri, 9 Aug 2019 17:14:59 +0000 (19:14 +0200)]
Document how to write tests requiring the 2018 edition
Lukas Markeffsky [Fri, 9 Aug 2019 15:44:05 +0000 (17:44 +0200)]
new_ret_no_self: walk associated types in impl Trait return types
bors [Fri, 9 Aug 2019 09:22:02 +0000 (09:22 +0000)]
Auto merge of #4362 - lzutao:expect-on-cstring_as_ptr, r=flip1995
Fix lint_cstring_as_ptr for expect
Closes #4312
changelog: none
bors [Fri, 9 Aug 2019 07:58:39 +0000 (07:58 +0000)]
Auto merge of #4361 - lzutao:fix-raw-string-on-single_char_pattern, r=phansch
Fix lint_single_char_pattern on raw string literal
Closes #4356
changelog: Handle raw string literal on `single_char_literal` lint.
Lzu Tao [Fri, 9 Aug 2019 03:45:49 +0000 (10:45 +0700)]
Add more tests for raw string literal
bors [Fri, 9 Aug 2019 06:07:00 +0000 (06:07 +0000)]
Auto merge of #4360 - atouchet:patch-1, r=phansch
Fix HTTPS in links
I accidentally missed these in my previous PR.
changelog: none
Lzu Tao [Fri, 9 Aug 2019 05:33:07 +0000 (12:33 +0700)]
Fix lint_cstring_as_ptr for expect
Lzu Tao [Fri, 9 Aug 2019 03:45:49 +0000 (10:45 +0700)]
Fix lint_single_char_pattern on raw string literal
Alex Touchet [Fri, 9 Aug 2019 02:59:22 +0000 (19:59 -0700)]
Fix HTTPS in links
bors [Thu, 8 Aug 2019 16:36:44 +0000 (16:36 +0000)]
Auto merge of #4358 - lzutao:cleanup_implicit_return, r=flip1995
Use source_callsite() instead of recursive outer_expn_info()
changelog: none
bors [Thu, 8 Aug 2019 15:56:09 +0000 (15:56 +0000)]
Auto merge of #4357 - lzutao:update-pr-template, r=flip1995
template: Update how to format source code with ./util/dev
changelog: none
bors [Thu, 8 Aug 2019 15:16:17 +0000 (15:16 +0000)]
Auto merge of #4355 - lzutao:macro_expn_try_err, r=flip1995
Fix macro expansion in try_err lint
Fixes #4309
changelog: none
Lzu Tao [Thu, 8 Aug 2019 14:37:19 +0000 (21:37 +0700)]
template: Update how to format source code with ./util/dev
Lzu Tao [Thu, 8 Aug 2019 14:28:40 +0000 (21:28 +0700)]
Use source_callsite() instead of recursive outer_expn_info()
Lzu Tao [Thu, 8 Aug 2019 12:33:34 +0000 (19:33 +0700)]
Use snippet_with_macro_callsite suggested by flip1995
Lzu Tao [Thu, 8 Aug 2019 12:33:34 +0000 (19:33 +0700)]
Fix macro expansion in try_err lint
bors [Wed, 7 Aug 2019 20:25:08 +0000 (20:25 +0000)]
Auto merge of #4350 - matthiaskrgr:readme_cargo_fix_clippy, r=phansch
README: mention experimental cargo fix clippy support
mention that cargo fix has experimental support for applying some clippy lint suggestions via "cargo fix -Z unstable-options --clippy"
[Rendered](https://github.com/matthiaskrgr/rust-clippy/tree/readme_cargo_fix_clippy#auto-applying-clippy-suggestions)
changelog: none
Matthias Krüger [Wed, 7 Aug 2019 19:07:35 +0000 (21:07 +0200)]
Update README.md (fix typo)
Co-Authored-By: Philipp Hansch <dev@phansch.net>
Matthias Krüger [Wed, 7 Aug 2019 14:24:14 +0000 (16:24 +0200)]
README: mention that cargo fix has experimental support for applying some clippy lint suggestions via "cargo fix -Z unstable-options --clippy"
bors [Wed, 7 Aug 2019 11:00:09 +0000 (11:00 +0000)]
Auto merge of #4339 - phansch:rustfix_needless_bool, r=flip1995
Add run-rustfix for needless_bool lint
This splits up the needless_bool tests into `fixable.rs` and
`simple.rs`. `simple.rs` contains the code that triggers the lint
diagnostic without a suggestion.
changelog: none
cc #3630
bors [Wed, 7 Aug 2019 10:22:06 +0000 (10:22 +0000)]
Auto merge of #4345 - phansch:enum_variants_fix, r=flip1995
Don't emit enum_variant_names if remainder starts with a numeric
changelog: Fix false positive in `pub_enum_variant_names` and `enum_variant_names`
As [per the reference](https://doc.rust-lang.org/reference/identifiers.html), identifiers must start with a letter. So we don't suggest a better
variant naming in case the remainder would start with a numeric.
Fixes #739
bors [Wed, 7 Aug 2019 08:31:47 +0000 (08:31 +0000)]
Auto merge of #4346 - atouchet:links, r=flip1995
Update Readme
<!--
Thank you for making Clippy better!
We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
`changelog` entry as `none`. Otherwise, please write a short comment
explaining your change.
If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.
If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [ ] Executed `util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `cargo fmt`
Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.
Delete this line and everything above before opening your PR -->
changelog: none
bors [Wed, 7 Aug 2019 07:05:53 +0000 (07:05 +0000)]
Auto merge of #4340 - lzutao:rustup, r=oli-obk
Rustup https://github.com/rust-lang/rust/pull/59369
Unblock https://github.com/rust-lang/rust/pull/63280
changelog: none
Alex Touchet [Tue, 6 Aug 2019 20:09:26 +0000 (13:09 -0700)]
Update Readme
Philipp Hansch [Tue, 6 Aug 2019 18:45:36 +0000 (20:45 +0200)]
Don't emit enum_variant_names if remainder starts with a numeric
As [per the reference](https://doc.rust-lang.org/reference/identifiers.html),
identifiers must start with a letter. So we don't suggest a better
variant naming in these cases.
Fixes #739
Lzu Tao [Tue, 6 Aug 2019 12:20:41 +0000 (19:20 +0700)]
Rustup https://github.com/rust-lang/rust/pull/59369
Philipp Hansch [Mon, 5 Aug 2019 20:05:05 +0000 (22:05 +0200)]
Add run-rustfix for needless_bool lint
This splits up the needless_bool tests into `fixable.rs` and
`simple.rs`. `simple.rs` contains the code that triggers the lint
diagnostic without a suggestion.
bors [Mon, 5 Aug 2019 18:54:11 +0000 (18:54 +0000)]
Auto merge of #4335 - phansch:fix_needless_bool_suggestion, r=flip1995
Fix needless_bool suggestion with if--else-if--else
changelog: Fix `needless_bool` suggestion with if--else-if--else
Closes #4334
Philipp Hansch [Mon, 5 Aug 2019 18:53:13 +0000 (20:53 +0200)]
fmt
Philipp Hansch [Sun, 4 Aug 2019 20:08:28 +0000 (22:08 +0200)]
Fix needless_bool suggestion with if-else-if-else
Closes #4334
bors [Mon, 5 Aug 2019 15:54:44 +0000 (15:54 +0000)]
Auto merge of #4203 - Urriel:feat/333_calling_main, r=flip1995
Add recursion check on main function
Changes:
- Add MainRecursion lint to Clippy
- Check for no-std setup
fixes #333
changelog: Add `main_recursion` lint
flip1995 [Mon, 5 Aug 2019 15:53:55 +0000 (17:53 +0200)]
Ignore no_std-test on windows and macos
flip1995 [Mon, 5 Aug 2019 11:24:31 +0000 (13:24 +0200)]
Run update_lints and fmt
Vincent Dal Maso [Mon, 17 Jun 2019 15:36:42 +0000 (17:36 +0200)]
Move expression check to LateLintPass
Changes:
- Move from EarlyLintPass
- Fix entrypoint check with function path def_id.
Vincent Dal Maso [Thu, 13 Jun 2019 08:58:35 +0000 (10:58 +0200)]
Add recursion check on main function
Changes:
- Add MainRecursion lint to clippy
- Check for no-std setup
fixes #333
bors [Mon, 5 Aug 2019 09:44:45 +0000 (09:44 +0000)]
Auto merge of #4338 - flip1995:rollup-9cm4jbr, r=flip1995
Rollup of 4 pull requests
Successful merges:
- #4329 (Doctests: Enable running doc tests for pedantic lints)
- #4330 (Doctests: Enable running doc tests for nursery lints)
- #4331 (Doctests: Enable running doc tests for restriction lints)
- #4332 (Split up cast.rs tests, run-rustfix for unnecessary_cast)
Failed merges:
r? @ghost
changelog: none
Philipp Krones [Mon, 5 Aug 2019 08:50:07 +0000 (10:50 +0200)]
Rollup merge of #4332 - phansch:rustfix_unnecessary_cast, r=flip1995
Split up cast.rs tests, run-rustfix for unnecessary_cast
This splits up the cast.rs tests and enables rustfix tests for the part
of the `unnecessary_cast` lint that emits `MachineApplicable`
suggestions.
changelog: none
cc #3630
Philipp Krones [Mon, 5 Aug 2019 08:50:06 +0000 (10:50 +0200)]
Rollup merge of #4331 - phansch:doctests_restriction, r=flip1995
Doctests: Enable running doc tests for restriction lints
changelog: Enabled remaining doc tests for lint documentation page
master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 231 passed; 0 failed; 123 ignored; 0 measured; 0 filtered out
Closes #4319 (assuming this is merged after #4329 and #4330)
Philipp Krones [Mon, 5 Aug 2019 08:50:04 +0000 (10:50 +0200)]
Rollup merge of #4330 - phansch:doctests_nursery, r=flip1995
Doctests: Enable running doc tests for nursery lints
changelog: none
master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 213 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
cc #4319
Philipp Krones [Mon, 5 Aug 2019 08:50:03 +0000 (10:50 +0200)]
Rollup merge of #4329 - phansch:doctests_pedantic, r=flip1995
Doctests: Enable running doc tests for pedantic lints
changelog: none
master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 254 passed; 0 failed; 131 ignored; 0 measured; 0 filtered out
cc #4319
bors [Mon, 5 Aug 2019 08:41:24 +0000 (08:41 +0000)]
Auto merge of #4337 - flip1995:let_unit, r=phansch
Make let_unit lint suggestion auto applicable
changelog: Make `let_unit` lint suggestion auto applicable
bors [Mon, 5 Aug 2019 08:00:39 +0000 (08:00 +0000)]
Auto merge of #4333 - phansch:rustfix_decimal_literal_representation, r=flip1995
Add run-rustfix for decimal_literal_representation lint
changelog: none
cc #3630
flip1995 [Mon, 5 Aug 2019 07:30:24 +0000 (09:30 +0200)]
Add tests for auto fixable let_unit suggestion
flip1995 [Mon, 5 Aug 2019 07:29:39 +0000 (09:29 +0200)]
Make let_unit lint suggestion auto applicable
bors [Mon, 5 Aug 2019 07:23:07 +0000 (07:23 +0000)]
Auto merge of #4336 - phansch:rustup, r=flip1995
Rustup to https://github.com/rust-lang/rust/pull/63213
changelog: none
Philipp Hansch [Mon, 5 Aug 2019 05:30:01 +0000 (07:30 +0200)]
Rustup to https://github.com/rust-lang/rust/pull/63213
Philipp Hansch [Sun, 4 Aug 2019 08:21:52 +0000 (10:21 +0200)]
Add run-rustfix for decimal_literal_representation lint
cc #3630
Philipp Hansch [Sun, 4 Aug 2019 06:24:23 +0000 (08:24 +0200)]
Split up cast.rs tests, run-rustfix for unnecessary_cast
This splits up the cast.rs tests and enables rustfix tests for the part
of the `unnecessary_cast` lint that emits `MachineApplicable`
suggestions.
cc #3630
Philipp Hansch [Sat, 3 Aug 2019 19:24:50 +0000 (21:24 +0200)]
Doctests: Enable running doc tests for restriction lints
Philipp Hansch [Sat, 3 Aug 2019 19:01:23 +0000 (21:01 +0200)]
Doctests: Enable running doc tests for nursery lints
Philipp Hansch [Sat, 3 Aug 2019 16:42:05 +0000 (18:42 +0200)]
Doctests: Enable running doc tests for pedantic lints
bors [Sat, 3 Aug 2019 14:06:13 +0000 (14:06 +0000)]
Auto merge of #4327 - phansch:doctests_perf, r=flip1995
Doctests: Enable running doc tests for perf lints
changelog: none
This should be possible to merge independently of #4325
cc #4319
bors [Sat, 3 Aug 2019 13:24:07 +0000 (13:24 +0000)]
Auto merge of #4325 - phansch:doctests_complexity, r=flip1995
Doctests: Enable running doc tests for complexity lints
changelog: none
master: `113 passed; 0 failed; 91 ignored; 0 measured; 0 filtered out`
this PR: `181 passed; 0 failed; 110 ignored; 0 measured; 0 filtered out`
cc #4319
bors [Sat, 3 Aug 2019 11:39:51 +0000 (11:39 +0000)]
Auto merge of #4328 - phansch:rustup, r=phansch
Rustup to latest rustc master
Broken due to:
* https://github.com/rust-lang/rust/pull/63180 (`Existential` -> `OpaqueTy`)
* https://github.com/rust-lang/rust/pull/63121 (New fields for `FormatSpec`)
changelog: none