]>
git.lizzy.rs Git - rust.git/log
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
bors [Tue, 26 Feb 2019 06:52:34 +0000 (06:52 +0000)]
Auto merge of #3820 - mikerite:remove-feature-try-from, r=Manishearth
Remove `#[feature(try_from)]`
`try_from` is now stable.
Michael Wright [Tue, 26 Feb 2019 06:43:47 +0000 (08:43 +0200)]
Remove `#[feature(try_from)]`
`try_from` is now stable.
Michael Wright [Tue, 26 Feb 2019 05:49:46 +0000 (07:49 +0200)]
Add [rustfmt::skip] to formatting lint tests
Philipp Hansch [Mon, 25 Feb 2019 21:53:02 +0000 (22:53 +0100)]
Update changelog for Rust 1.33
mcarton [Mon, 25 Feb 2019 20:48:20 +0000 (21:48 +0100)]
Fix `bool_comparison` with non-`bool` expressions
bors [Mon, 25 Feb 2019 16:21:26 +0000 (16:21 +0000)]
Auto merge of #3808 - mikerite:useless-format-suggestions, r=oli-obk
Fix `useless_format` suggestions
bors [Mon, 25 Feb 2019 13:46:31 +0000 (13:46 +0000)]
Auto merge of #3816 - g-bartoszek:redundant_closure_for_macros, r=Manishearth
do not trigger redundant_closure for external macros
fixes #3791
Grzegorz [Mon, 25 Feb 2019 12:40:28 +0000 (13:40 +0100)]
redundant_closure does not trigger for external macros
bors [Mon, 25 Feb 2019 12:30:35 +0000 (12:30 +0000)]
Auto merge of #3772 - flip1995:ice-3719, r=Manishearth
Fix ICE #3719+#3718 in lint match_ref_pats
Fixes #3719
This conveniently also fixes #3718
The ICE occurs when the match expression was a macro call, where the macro was defined in another file. Since we don't have the ability to reproduce this behavior with our UI tests (AFAIK), I couldn't add a test reproducing this ICE.. However, I added a test which is related to the ICE, to show the new behavior of the lint.
I tested it with the mscheme repo locally and the ICE didn't happen anymore.
r? @matthiaskrgr
bors [Mon, 25 Feb 2019 12:08:43 +0000 (12:08 +0000)]
Auto merge of #3805 - martinsp:ice-3747, r=Manishearth
Fix ICE #3747
I'm not sure if this was the correct approach.
I don't know if I put tests/ui/crashses/ice-3747.rs in correct place because the test always passed when I ran it with `cargo test`, even without the fix applied.
If I run that test with `env CLIPPY_TESTS=true cargo run --bin clippy-driver -- -L ./target/debug tests/ui/crashes/ice-3747.rs` then the test correctly fails without the fix applied
fixes #3747
ljedrz [Mon, 25 Feb 2019 10:06:46 +0000 (11:06 +0100)]
fix: replace wrong id
bors [Mon, 25 Feb 2019 06:31:27 +0000 (06:31 +0000)]
Auto merge of #3815 - phansch:make_private, r=Manishearth
Make DiagnosticWrapper private
It's doesn't have to be public anywhere outside of clippy_lints as far as I can tell.
Philipp Hansch [Mon, 25 Feb 2019 06:14:44 +0000 (07:14 +0100)]
Make DiagnosticWrapper private
It's doesn't have to be public anywhere outside of clippy_lints
ljedrz [Sun, 24 Feb 2019 18:43:15 +0000 (19:43 +0100)]
HirIdify some lints
bors [Sun, 24 Feb 2019 17:25:58 +0000 (17:25 +0000)]
Auto merge of #3811 - rust-lang:test-for-2526, r=mcarton
Add a test for #2526
Closes #2526, which seems to have been fixed at some point, but I couldn't find a test for it.
mcarton [Sun, 24 Feb 2019 14:59:58 +0000 (15:59 +0100)]
Add a test for #2526
bors [Sun, 24 Feb 2019 15:35:01 +0000 (15:35 +0000)]
Auto merge of #3810 - phansch:refactor/extract_module, r=flip1995
Extract diagnostics module and document some functions
This moves the lint building functions from `utils/mod.rs` to their own
`utils/diagnostics.rs` file. Also adds documentation for three of them.
bors [Sun, 24 Feb 2019 14:32:55 +0000 (14:32 +0000)]
Auto merge of #3790 - ljedrz:HirIdify_intravisit, r=phansch
partially HirIdify lints
Enables https://github.com/rust-lang/rust/pull/58232 (a part of https://github.com/rust-lang/rust/pull/57578).
ljedrz [Sun, 24 Feb 2019 14:16:16 +0000 (15:16 +0100)]
fix formatting
Philipp Hansch [Sun, 24 Feb 2019 13:11:05 +0000 (14:11 +0100)]
Extract diagnostics module and document some functions
This moves the lint building functions from `utils/mod.rs` to their own
`utils/diagnostics.rs` file. Also adds documentation for three of them.
Philipp Hansch [Sun, 24 Feb 2019 08:49:17 +0000 (09:49 +0100)]
Document some `span_lint_*` util functions
Michael Wright [Sun, 24 Feb 2019 05:30:08 +0000 (07:30 +0200)]
Fix `useless_format` suggestions
Martins Polakovs [Sat, 23 Feb 2019 17:29:30 +0000 (19:29 +0200)]
Fix ICE #3747
[Martins Polakovs, John Firebaugh]
bors [Sat, 23 Feb 2019 14:50:39 +0000 (14:50 +0000)]
Auto merge of #3798 - eyko:patch-1, r=flip1995
Fix broken link in README
I noticed the link to the lint list had a typo, so this PR is just that:
```diff
- [lint list]](https://rust-lang.github.io/rust-clippy/master/index.html)
+ [lint list](https://rust-lang.github.io/rust-clippy/master/index.html)
```
bors [Sat, 23 Feb 2019 00:23:56 +0000 (00:23 +0000)]
Auto merge of #3801 - Wilfred:patch-1, r=Manishearth
Fix broken markdown in README.md
Wilfred Hughes [Sat, 23 Feb 2019 00:20:57 +0000 (00:20 +0000)]
Fix broken markdown in README.md