]>
git.lizzy.rs Git - rust.git/log
Philipp Hansch [Tue, 12 Mar 2019 06:32:02 +0000 (07:32 +0100)]
Remove some unused features and `error-pattern`s
bors [Sun, 10 Mar 2019 23:21:48 +0000 (23:21 +0000)]
Auto merge of #3767 - alexreg:cosmetic-2, r=flip1995
Various cosmetic improvements
Related to the larger effort of https://github.com/rust-lang/rust/pull/58036.
flip1995 [Sun, 10 Mar 2019 22:01:56 +0000 (23:01 +0100)]
Fix/Ignore doc tests
flip1995 [Sun, 10 Mar 2019 21:12:26 +0000 (22:12 +0100)]
Run rustfmt
flip1995 [Sun, 10 Mar 2019 21:07:10 +0000 (22:07 +0100)]
Update tests
Alexander Regueiro [Sun, 10 Mar 2019 17:19:38 +0000 (17:19 +0000)]
Reblessed test outputs.
Alexander Regueiro [Sun, 10 Mar 2019 17:19:47 +0000 (17:19 +0000)]
Addressed points raised in review.
Alexander Regueiro [Thu, 31 Jan 2019 01:15:29 +0000 (01:15 +0000)]
Various cosmetic improvements.
bors [Sun, 10 Mar 2019 14:26:31 +0000 (14:26 +0000)]
Auto merge of #3733 - Zoxc:rustc-interface, r=oli-obk
Use the new rustc interface
Shows the changes required to compile with https://github.com/rust-lang/rust/pull/56732
John Kåre Alsaker [Sun, 10 Mar 2019 11:00:17 +0000 (12:00 +0100)]
rustfmt
John Kåre Alsaker [Fri, 1 Feb 2019 22:28:14 +0000 (23:28 +0100)]
Use the new rustc interface
bors [Sun, 10 Mar 2019 08:52:24 +0000 (08:52 +0000)]
Auto merge of #3863 - rust-lang:get_unwrap, r=oli-obk
Move get_unwrap to restriction
fixes #3862
r? @oli-obk
Manish Goregaokar [Sat, 9 Mar 2019 18:12:22 +0000 (10:12 -0800)]
Move get_unwrap to restriction
fixes #3862
bors [Sat, 9 Mar 2019 15:05:38 +0000 (15:05 +0000)]
Auto merge of #3824 - phansch:adding_lints, r=phansch
Add lint writing documentation
[Rendered](https://github.com/phansch/rust-clippy/blob/adding_lints/doc/adding_lints.md)
This adds a new documentation page that explains how to write Clippy
lints. It guides the reader through creating a `foo` function lint.
I plan to iterate a bit more on the prose of some sections, but I think the
general structure is fine now, so I'm looking forward to feedback =)
One thing I'm not sure about: I felt like this is too big for CONTRIBUTING.md
so I put it into a new `doc/` directory. I can imagine having more
documentation in the future, so we might even want to create a book using
mdbook instead? Or should everything go into CONTRIBUTING.md?
Further things left to do:
- [x] Link from CONTRIBUTING.md
- [x] Remove things covered in this guide from CONTRIBUTING.md
- [x] Section about `clippy::author` attribute
- [x] Run `remark-lint` on CI over the `doc` directory and fix things
bors [Sat, 9 Mar 2019 12:05:41 +0000 (12:05 +0000)]
Auto merge of #3860 - phansch:refactor_out_opt_def_id, r=flip1995
Refactor: Remove utils::opt_def_id
This removes some indirection. Probably this method was uplifted to
rustc at some point?
bors [Sat, 9 Mar 2019 11:41:26 +0000 (11:41 +0000)]
Auto merge of #3861 - flip1995:rollup, r=flip1995
Rollup of 3 pull requests
Successful merges:
- #3851 (Refactor: Extract `trait_ref_of_method` function)
- #3852 (Refactor: Cleanup one part of assign_ops lint)
- #3857 (Document match_path, improve match_qpath docs)
Failed merges:
r? @ghost
Philipp Krones [Sat, 9 Mar 2019 11:24:44 +0000 (12:24 +0100)]
Rollup merge of #3857 - phansch:document_path_qpath, r=flip1995
Document match_path, improve match_qpath docs
Inching towards enabling `#[deny(missing_docs)]` in utils :scroll:
Philipp Krones [Sat, 9 Mar 2019 11:24:43 +0000 (12:24 +0100)]
Rollup merge of #3852 - phansch:refactor_assign_ops, r=flip1995
Refactor: Cleanup one part of assign_ops lint
Removes a lot of indentation and separates lint emission from lint
logic. Only touches the `hir::ExprKind::AssignOp` part of the lint.
Philipp Krones [Sat, 9 Mar 2019 11:24:42 +0000 (12:24 +0100)]
Rollup merge of #3851 - phansch:refactor_trait_stuff, r=flip1995
Refactor: Extract `trait_ref_of_method` function
This pattern was used in three places after #3844, so I think it's worth moving it into `utils/mod.rs` and documenting it.
bors [Fri, 8 Mar 2019 17:10:52 +0000 (17:10 +0000)]
Auto merge of #3854 - ljedrz:rustc_58992, r=phansch
Align with rust-lang/rust/#58992
Some adjustments needed after the most recent round of HirIdification.
Philipp Hansch [Fri, 8 Mar 2019 13:14:41 +0000 (14:14 +0100)]
Refactor: Remove utils::opt_def_id
This removes some indirection. Probably this method was uplifted to
rustc at some point?
Philipp Hansch [Fri, 8 Mar 2019 08:50:20 +0000 (09:50 +0100)]
Document match_path, improve match_qpath docs
Philipp Hansch [Fri, 8 Mar 2019 08:44:22 +0000 (09:44 +0100)]
cargo fmt
Philipp Hansch [Fri, 8 Mar 2019 08:42:09 +0000 (09:42 +0100)]
fmt
Philipp Krones [Fri, 8 Mar 2019 08:40:12 +0000 (09:40 +0100)]
Update clippy_lints/src/utils/mod.rs
Co-Authored-By: phansch <dev@phansch.net>
Philipp Hansch [Fri, 8 Mar 2019 08:10:41 +0000 (09:10 +0100)]
Fix doctest
Philipp Hansch [Thu, 7 Mar 2019 07:14:26 +0000 (08:14 +0100)]
Refactor: Cleanup one part of assign_ops lint
Removes a lot of indentation and separates lint emission from lint
logic. Only touches the `hir::ExprKind::AssignOp` part of the lint.
Philipp Hansch [Fri, 8 Mar 2019 07:50:13 +0000 (08:50 +0100)]
Update comment location
bors [Fri, 8 Mar 2019 07:36:32 +0000 (07:36 +0000)]
Auto merge of #3856 - mikerite:clippy-dev-enchancement-1, r=phansch
Improve Clippy dev help
+ Print help if no subcommand is supplied
+ Make a short version of `update_lints` help for the subcommand listing
bors [Fri, 8 Mar 2019 07:16:28 +0000 (07:16 +0000)]
Auto merge of #3855 - rchaser53:issue-3849, r=flip1995
Remove an unused binary file
related https://github.com/rust-lang/rust-clippy/pull/3853
I'm sorry.
Michael Wright [Fri, 8 Mar 2019 05:45:31 +0000 (07:45 +0200)]
Improve Clippy dev help
+ Print help if no subcommand is supplied
+ Make a short version of `update_lints` help for the subcommand listing
rChaser53 [Thu, 7 Mar 2019 23:14:29 +0000 (08:14 +0900)]
Remove an unused binary file
ljedrz [Thu, 7 Mar 2019 20:51:05 +0000 (21:51 +0100)]
align with rust-lang/rust/#58992
bors [Thu, 7 Mar 2019 15:02:53 +0000 (15:02 +0000)]
Auto merge of #3853 - rchaser53:issue-3849, r=flip1995
fix missing a semicolon
related: https://github.com/rust-lang/rust-clippy/issues/3849
rchaser53 [Thu, 7 Mar 2019 13:07:01 +0000 (22:07 +0900)]
fix missing a semicolon
Philipp Hansch [Thu, 7 Mar 2019 06:42:38 +0000 (07:42 +0100)]
Refactor: Extract `trait_ref_of_method` function
bors [Thu, 7 Mar 2019 07:05:35 +0000 (07:05 +0000)]
Auto merge of #3850 - mikerite:rustfmt-tests, r=phansch
More test improvements
Michael Wright [Thu, 7 Mar 2019 06:21:41 +0000 (08:21 +0200)]
Enable rustfix on `unused_unit` tests
Michael Wright [Thu, 7 Mar 2019 06:13:59 +0000 (08:13 +0200)]
Add `[rustfmt::skip]` to `unused_unit` test
Michael Wright [Thu, 7 Mar 2019 06:03:15 +0000 (08:03 +0200)]
Add `[rustfmt::skip]` to `doc_markdown` tests
bors [Wed, 6 Mar 2019 13:41:31 +0000 (13:41 +0000)]
Auto merge of #3803 - felix91gr:master, r=oli-obk
Cognitive Complexity (step 1 out of 3+): name changes
Following up on #3793
**Overall checklist:**
1. **Name changes**
2. MVP of functionality
3. Tests
After this PR, we will start working on the implementation itself.
Félix Fischer [Sat, 23 Feb 2019 01:19:50 +0000 (22:19 -0300)]
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
bors [Wed, 6 Mar 2019 06:48:26 +0000 (06:48 +0000)]
Auto merge of #3845 - euclio:unused-comments, r=phansch
move lint documentation into macro invocations
This PR moves lint documentation inside `declare_clippy_lint!` macro invocations, to avoid triggering the `unused_doc_comments` lint once it's modified in rust-lang/rust#57882. This PR is necessary to unblock that work, since the large number of warnings generated in `clippy_lints` causes Travis to hit the log length limit.
This PR also updates the documentation and website generation script.
It would be nice to get a clippy update in the Rust repo once this is merged.
cc @phansch
bors [Wed, 6 Mar 2019 05:54:48 +0000 (05:54 +0000)]
Auto merge of #3846 - mikerite:fix-3839, r=phansch
Ensure `expect_fun_call` bad suggestion is fixed
Closes #3839
Michael Wright [Wed, 6 Mar 2019 05:00:05 +0000 (07:00 +0200)]
Ensure `expect_fun_call` bad suggestion is fixed
Closes #3839
Andy Russell [Tue, 5 Mar 2019 22:23:50 +0000 (17:23 -0500)]
fix or ignore failing doc tests
Andy Russell [Tue, 5 Mar 2019 16:50:33 +0000 (11:50 -0500)]
move lint documentation into macro invocations
bors [Tue, 5 Mar 2019 10:12:53 +0000 (10:12 +0000)]
Auto merge of #3844 - phansch:const_fn_external_macro, r=oli-obk
Fix two missing_const_for_fn false positives
Fixes #3841
* Fixes false positive in external macros
* Fixes false positive when implement trait methods
Philipp Hansch [Tue, 5 Mar 2019 07:11:55 +0000 (08:11 +0100)]
Fix missing_const_for_fn for impl trait methods
Philipp Hansch [Mon, 4 Mar 2019 21:56:33 +0000 (22:56 +0100)]
Don't trigger missing_const_for_fn in external macros
As reported in #3841. Only fixes the part where it triggers on the
`derive`.
Philipp Hansch [Mon, 4 Mar 2019 19:43:11 +0000 (20:43 +0100)]
Add rustc nightly docs to cheatsheet
Philipp Hansch [Mon, 4 Mar 2019 19:39:28 +0000 (20:39 +0100)]
s/you/we; One more checklist item
bors [Sun, 3 Mar 2019 15:09:00 +0000 (15:09 +0000)]
Auto merge of #3838 - mati865:rustup, r=phansch
Upgrade compiletest_rs to 0.3.19
Mateusz Mikuła [Sun, 3 Mar 2019 15:02:59 +0000 (16:02 +0100)]
Upgrade compiletest_rs to 0.3.19
Philipp Hansch [Sun, 3 Mar 2019 09:00:05 +0000 (10:00 +0100)]
Add the rustc guide to the cheatsheet
Philipp Hansch [Sun, 3 Mar 2019 08:50:56 +0000 (09:50 +0100)]
More text fixes after Test section was moved to top
Philipp Hansch [Sun, 3 Mar 2019 08:48:42 +0000 (09:48 +0100)]
Reword 'Setup' a bit
Philipp Hansch [Sat, 2 Mar 2019 15:29:11 +0000 (16:29 +0100)]
Note that stderr files don't have to be created manually
Philipp Hansch [Sat, 2 Mar 2019 15:25:05 +0000 (16:25 +0100)]
Author lint usage via playground
Philipp Hansch [Fri, 1 Mar 2019 06:32:51 +0000 (07:32 +0100)]
Run remark in `doc` directory, too.
Philipp Hansch [Fri, 1 Mar 2019 06:32:10 +0000 (07:32 +0100)]
Cleanup 'Writing code' in CONTRIBUTING.md
This is now all included in `doc/adding_lints.md`
Philipp Hansch [Fri, 1 Mar 2019 06:30:58 +0000 (07:30 +0100)]
Copy from CONTRIBUTING.md: author lint, rustfix tests, rustfmt
And adapt the wording a bit so that it fits in the overall guide.
Philipp Hansch [Thu, 28 Feb 2019 06:10:59 +0000 (07:10 +0100)]
Mention Clippy utils
Philipp Hansch [Thu, 28 Feb 2019 06:06:10 +0000 (07:06 +0100)]
Remind to run update-all-references.sh at the end
Philipp Hansch [Thu, 28 Feb 2019 06:00:22 +0000 (07:00 +0100)]
Use positive if condition for readability
Philipp Hansch [Wed, 27 Feb 2019 21:34:16 +0000 (22:34 +0100)]
Expand on lint implementation section, wrap lines
Wilco Kusee [Wed, 27 Feb 2019 21:15:33 +0000 (22:15 +0100)]
Implicit return
Co-Authored-By: phansch <dev@phansch.net>
Wilco Kusee [Wed, 27 Feb 2019 21:15:19 +0000 (22:15 +0100)]
Implicit return
Co-Authored-By: phansch <dev@phansch.net>
Philipp Hansch [Tue, 26 Feb 2019 19:55:17 +0000 (20:55 +0100)]
Add lint writing documentation
This adds a new documentation page that explains how to write Clippy
lints. It guides the reader through creating a `foo` function lint.
bors [Sun, 3 Mar 2019 12:26:15 +0000 (12:26 +0000)]
Auto merge of #3834 - ljedrz:HirIdification_fix, r=phansch
HirIdification fixes
Supersedes https://github.com/rust-lang/rust-clippy/pull/3828, enables https://github.com/rust-lang/rust/pull/58836.
As usual, requesting a branch.
Philipp Hansch [Sun, 3 Mar 2019 12:00:49 +0000 (13:00 +0100)]
fmt fixes
ljedrz [Fri, 1 Mar 2019 12:26:06 +0000 (13:26 +0100)]
align with rust-lang/rust/#58836
ljedrz [Wed, 27 Feb 2019 09:39:33 +0000 (10:39 +0100)]
enable rust-lang/rust#58754
bors [Fri, 1 Mar 2019 16:03:15 +0000 (16:03 +0000)]
Auto merge of #3823 - spastorino:place_base, r=flip1995
Place::Local(x) is now Place::Base(PlaceBase::Local(x))
We need to merge this after the beta cut for this https://github.com/rust-lang/rust/pull/58631 to work.
/cc @oli-obk
Santiago Pastorino [Tue, 26 Feb 2019 18:02:22 +0000 (15:02 -0300)]
Place::Local(x) is now Place::Base(PlaceBase::Local(x))
bors [Fri, 1 Mar 2019 12:51:11 +0000 (12:51 +0000)]
Auto merge of #3833 - mati865:rustup, r=oli-obk
Fix build with the master
https://github.com/rust-lang/rust/pull/58689 broke compiletest.
Mateusz Mikuła [Fri, 1 Mar 2019 10:54:25 +0000 (11:54 +0100)]
Use temporary branch for compiletest
https://github.com/rust-lang/rust/pull/58689 broke it
bors [Thu, 28 Feb 2019 19:56:25 +0000 (19:56 +0000)]
Auto merge of #3831 - martin-t:master, r=flip1995
Use the same <title> as <h1> on gh-pages
I think this makes the page easier to find using firefox's URL bar - it (afaik) searches based on the page's URL and title so if somebody doesn't have it bookmarked but remembers that the page contained "ALL lints" or something similar it's easy to go to it directly without resorting to a search engine.
bors [Thu, 28 Feb 2019 19:20:06 +0000 (19:20 +0000)]
Auto merge of #3830 - flip1995:unknown_attribute, r=oli-obk
Error on unknown or deprecated attributes
The reason I decided to not make this a lint is, that unknown attributes are always a hard error in rustc and also in rustfmt, which cannot be turned off by an `allow`. This could have been done by introducing a category which would be forbid-by-default. But that would have introduced a new lint category+group for just one lint and also wouldn't be consistent with rustfmt and rustc.
flip1995 [Thu, 28 Feb 2019 15:47:00 +0000 (16:47 +0100)]
Add test for unknown Clippy attributes
Martin Taibr [Thu, 28 Feb 2019 18:17:10 +0000 (19:17 +0100)]
Use the same <title> as <h1> on gh-pages
flip1995 [Thu, 28 Feb 2019 15:44:42 +0000 (16:44 +0100)]
Error an unknown or deprecated Clippy attribute
bors [Thu, 28 Feb 2019 10:09:00 +0000 (10:09 +0000)]
Auto merge of #3829 - mikerite:fix-double-parens-suggestions, r=flip1995
Add `rustfmt::skip` to `double_parens` tests
Michael Wright [Thu, 28 Feb 2019 06:02:45 +0000 (08:02 +0200)]
Add `rustfmt::skip` to `double_parens` tests
bors [Wed, 27 Feb 2019 08:28:48 +0000 (08:28 +0000)]
Auto merge of #3666 - detrumi:map-or-on-non-copy, r=flip1995
Only suggest map_or for copy types
Fixes #2686
bors [Wed, 27 Feb 2019 06:49:09 +0000 (06:49 +0000)]
Auto merge of #3826 - mikerite:rustfmt-outer-attr-tests, r=phansch
Add `rustfmt::skip` to outer attr format tests
bors [Wed, 27 Feb 2019 06:28:08 +0000 (06:28 +0000)]
Auto merge of #3827 - phansch:rustup, r=Manishearth
Rustup rust-lang/rust#58321
Fixes the build after https://github.com/rust-lang/rust/issues/58321
Philipp Hansch [Wed, 27 Feb 2019 06:20:49 +0000 (07:20 +0100)]
Rustup https://github.com/rust-lang/rust/pull/58321
Michael Wright [Wed, 27 Feb 2019 05:41:07 +0000 (07:41 +0200)]
Add `rustfmt::skip` to outer attr format tests
bors [Tue, 26 Feb 2019 17:30:48 +0000 (17:30 +0000)]
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
bors [Tue, 26 Feb 2019 16:40:12 +0000 (16:40 +0000)]
Auto merge of #3818 - phansch:update_changelog, r=oli-obk
Update changelog for Rust 1.33
None
Wilco Kusee [Tue, 5 Feb 2019 15:59:23 +0000 (16:59 +0100)]
Fix false negative
Wilco Kusee [Mon, 21 Jan 2019 17:29:35 +0000 (18:29 +0100)]
Attempt to fix false negative
Wilco Kusee [Sat, 19 Jan 2019 11:53:21 +0000 (12:53 +0100)]
Move lint_map_unwrap_or to its own file
Wilco Kusee [Wed, 16 Jan 2019 15:55:53 +0000 (16:55 +0100)]
Only suggest map_or for copy types
bors [Tue, 26 Feb 2019 15:51:40 +0000 (15:51 +0000)]
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.
Grzegorz [Tue, 26 Feb 2019 11:12:27 +0000 (12:12 +0100)]
do not trigger redundant_closure when there is a difference in borrow level between closure parameter and "self"
bors [Tue, 26 Feb 2019 10:43:50 +0000 (10:43 +0000)]
Auto merge of #3814 - ljedrz:HirIdification_lockstep_upgrade, r=phansch
HirIdify some lints
Unblocks https://github.com/rust-lang/rust/pull/58561 (a part of [rust-lang/rust#57578](https://github.com/rust-lang/rust/pull/57578)). Can we branch it like with https://github.com/rust-lang/rust-clippy/pull/3790? I can rebase on a different commit if need be.
Haven't had time to run tests yet, so I'd wait for Travis 🙈.
ljedrz [Tue, 26 Feb 2019 10:21:07 +0000 (11:21 +0100)]
fix line format
bors [Tue, 26 Feb 2019 07:21:01 +0000 (07:21 +0000)]
Auto merge of #3819 - mikerite:rustfmt-formatting-tests, r=phansch
Add [rustfmt::skip] to formatting lint tests