]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoChange rtype of int_plus_one detection to Option<String>
Michael Recachinas [Sun, 24 Sep 2017 11:31:12 +0000 (12:31 +0100)]
Change rtype of int_plus_one detection to Option<String>

6 years agoChange to returning Option<(bool, Option<String>)>
Michael Recachinas [Sun, 24 Sep 2017 09:30:29 +0000 (10:30 +0100)]
Change to returning Option<(bool, Option<String>)>

6 years agoRemove old return-value
Michael Recachinas [Sun, 24 Sep 2017 08:58:58 +0000 (09:58 +0100)]
Remove old return-value

6 years agoUse span_lint_and_then as per feedback
Michael Recachinas [Sat, 23 Sep 2017 18:32:11 +0000 (19:32 +0100)]
Use span_lint_and_then as per feedback

6 years agoAdd tests for 'int_plus_one'
Michael Recachinas [Sun, 17 Sep 2017 16:27:40 +0000 (17:27 +0100)]
Add tests for 'int_plus_one'

6 years agoRegister 'int_plus_one' lint case in clippy_lints
Michael Recachinas [Sun, 17 Sep 2017 16:27:16 +0000 (17:27 +0100)]
Register 'int_plus_one' lint case in clippy_lints

6 years ago(#1955): Suggests `x > y` over `x >= y + 1` for ints
Michael Recachinas [Sun, 17 Sep 2017 16:18:12 +0000 (17:18 +0100)]
(#1955): Suggests `x > y` over `x >= y + 1` for ints

This module handles the following cases:
- `... >= ... + 1` and `... >= 1 + ...`
- `... - 1 >= ...` and `-1 + ... >= ...`
- `... + 1 <= ...` and `... + 1 <= ...`
- `... <= ... - 1` and `... <= -1 + ...`

Note: this only goes 1 level deep (i.e., does not constant-fold) and
does not currently simplify expressions. Examples of these
cases include:
```rust
let x = 1;
y >= y + x; // won't catch this case or any permutation

x + 1 >= y + 2; // won't catch this case

x + 1 - 1 >= y - 1 + 1; // WILL catch this case when it likely shouldn't
```

6 years agoMerge pull request #2057 from topecongiro/issue-1818
llogiq [Sat, 16 Sep 2017 07:16:55 +0000 (09:16 +0200)]
Merge pull request #2057 from topecongiro/issue-1818

Enhance CHARS_*_CMP lint

6 years agoMerge pull request #2056 from topecongiro/issue-1851
llogiq [Sat, 16 Sep 2017 07:13:13 +0000 (09:13 +0200)]
Merge pull request #2056 from topecongiro/issue-1851

Add suggestion to needless_borrow

6 years agoUpdate tests
topecongiro [Sat, 16 Sep 2017 05:50:30 +0000 (14:50 +0900)]
Update tests

6 years agoEnhance CHARS_*_CMP lint
topecongiro [Sat, 16 Sep 2017 05:50:07 +0000 (14:50 +0900)]
Enhance CHARS_*_CMP lint

6 years agoUpdate tests
topecongiro [Sat, 16 Sep 2017 02:27:46 +0000 (11:27 +0900)]
Update tests

6 years agoAdd suggestion to needless_borrow
topecongiro [Sat, 16 Sep 2017 02:27:24 +0000 (11:27 +0900)]
Add suggestion to needless_borrow

6 years agoMerge pull request #2052 from topecongiro/issue-1990
Oliver Schneider [Fri, 15 Sep 2017 07:21:46 +0000 (09:21 +0200)]
Merge pull request #2052 from topecongiro/issue-1990

Add ExprLoop to contains_continue_expr()

6 years agoUpdate a test
Seiichi Uchida [Thu, 14 Sep 2017 13:27:29 +0000 (22:27 +0900)]
Update a test

6 years agoAdd ExprLoop to contains_continue_expr()
Seiichi Uchida [Thu, 14 Sep 2017 13:26:59 +0000 (22:26 +0900)]
Add ExprLoop to contains_continue_expr()

6 years agoBump version
Seiichi Uchida [Thu, 14 Sep 2017 13:24:00 +0000 (22:24 +0900)]
Bump version

6 years agoVersion bump
Oliver Schneider [Thu, 14 Sep 2017 07:13:54 +0000 (09:13 +0200)]
Version bump

6 years agoMerge pull request #2049 from topecongiro/rustc-fix
Oliver Schneider [Thu, 14 Sep 2017 07:11:10 +0000 (09:11 +0200)]
Merge pull request #2049 from topecongiro/rustc-fix

rustc fix

6 years agoRemove '\t' from .stderr
topecongiro [Thu, 14 Sep 2017 04:18:34 +0000 (13:18 +0900)]
Remove '\t' from .stderr

to make cargo test pass

6 years agoAdd a missing argument
topecongiro [Thu, 14 Sep 2017 04:18:08 +0000 (13:18 +0900)]
Add a missing argument

6 years agoMerge remote-tracking branch 'origin/master' into rustup
Oliver Schneider [Wed, 13 Sep 2017 13:41:09 +0000 (15:41 +0200)]
Merge remote-tracking branch 'origin/master' into rustup

6 years agoRustup
Oliver Schneider [Wed, 13 Sep 2017 13:34:04 +0000 (15:34 +0200)]
Rustup

6 years agoMerge pull request #2046 from siiptuo/small-doc-fixes
llogiq [Tue, 12 Sep 2017 18:12:48 +0000 (20:12 +0200)]
Merge pull request #2046 from siiptuo/small-doc-fixes

Small documentation fixes

6 years agoFix link in trivial_regex
Tuomas Siipola [Tue, 12 Sep 2017 16:04:57 +0000 (19:04 +0300)]
Fix link in trivial_regex

6 years agoFix empty documentation in unit_expr
Tuomas Siipola [Tue, 12 Sep 2017 16:04:05 +0000 (19:04 +0300)]
Fix empty documentation in unit_expr

6 years agoFix links in approx_const
Tuomas Siipola [Tue, 12 Sep 2017 16:03:34 +0000 (19:03 +0300)]
Fix links in approx_const

6 years agoVersion bump
Oliver Schneider [Tue, 12 Sep 2017 12:40:24 +0000 (14:40 +0200)]
Version bump

6 years agoRustup
Oliver Schneider [Tue, 12 Sep 2017 12:26:40 +0000 (14:26 +0200)]
Rustup

6 years agoRegressions (#2041)
Oliver Schneider [Tue, 12 Sep 2017 12:25:58 +0000 (14:25 +0200)]
Regressions (#2041)

6 years agoMerge pull request #2039 from rust-lang-nursery/ptr-arg-suggestion
Oliver Schneider [Mon, 11 Sep 2017 06:30:52 +0000 (08:30 +0200)]
Merge pull request #2039 from rust-lang-nursery/ptr-arg-suggestion

suggestion for ptr_arg

6 years agosuggestion for ptr_arg
Andre Bogus [Sun, 10 Sep 2017 17:32:24 +0000 (19:32 +0200)]
suggestion for ptr_arg

6 years agoMerge pull request #2037 from Aaron1011/clone-rc
Oliver Schneider [Sun, 10 Sep 2017 09:27:02 +0000 (11:27 +0200)]
Merge pull request #2037 from Aaron1011/clone-rc

Add CLONE_ON_REF_PTR lint

6 years agoAdd CLONE_ON_REF_PTR lint
Aaron Hill [Sun, 10 Sep 2017 01:51:54 +0000 (21:51 -0400)]
Add CLONE_ON_REF_PTR lint

Closes issue #1645

6 years agoMerge pull request #2034 from Aaron1011/update-rust
Oliver Schneider [Sat, 9 Sep 2017 12:47:40 +0000 (14:47 +0200)]
Merge pull request #2034 from Aaron1011/update-rust

Update for latest Rust

6 years agoBump version
Oliver Schneider [Sat, 9 Sep 2017 12:37:16 +0000 (14:37 +0200)]
Bump version

6 years agoUse hir_id instead of fetching hir_id via the NodeId
Oliver Schneider [Sat, 9 Sep 2017 12:06:41 +0000 (14:06 +0200)]
Use hir_id instead of fetching hir_id via the NodeId

6 years agoUpdate for latest Rust
Aaron Hill [Sat, 9 Sep 2017 05:23:08 +0000 (01:23 -0400)]
Update for latest Rust

This is mainly due to https://github.com/rust-lang/rust/commit/dead08cb33134

6 years agoMerge pull request #2029 from rust-lang-nursery/rustup
Oliver Schneider [Fri, 8 Sep 2017 12:26:42 +0000 (14:26 +0200)]
Merge pull request #2029 from rust-lang-nursery/rustup

Soft rustup (only fixed some tests)

6 years agoSoft rustup (only fixed some tests)
Oliver Schneider [Fri, 8 Sep 2017 10:28:31 +0000 (12:28 +0200)]
Soft rustup (only fixed some tests)

6 years agoMerge pull request #1963 from rust-lang-nursery/upstream
Oliver Schneider [Wed, 6 Sep 2017 05:57:57 +0000 (07:57 +0200)]
Merge pull request #1963 from rust-lang-nursery/upstream

Rust needs clippy to have a Cargo.lock

6 years agoUpdate changelog
Manish Goregaokar [Tue, 5 Sep 2017 22:10:41 +0000 (15:10 -0700)]
Update changelog

6 years agoMerge pull request #2004 from sunfishcode/master
Manish Goregaokar [Tue, 5 Sep 2017 22:09:39 +0000 (15:09 -0700)]
Merge pull request #2004 from sunfishcode/master

When suggesting `from(x)` for lossless casts, strip parens from `x`.

6 years agoformat comment
Manish Goregaokar [Tue, 5 Sep 2017 21:19:51 +0000 (14:19 -0700)]
format comment

6 years agoMerge pull request #2023 from montrivo/while_let_loop
Manish Goregaokar [Tue, 5 Sep 2017 21:19:00 +0000 (14:19 -0700)]
Merge pull request #2023 from montrivo/while_let_loop

`while_let_loop` doesn't take into account break-with-value #1948

6 years agoMerge pull request #2022 from rust-lang-nursery/oli-obk-patch-1
Manish Goregaokar [Tue, 5 Sep 2017 20:30:40 +0000 (13:30 -0700)]
Merge pull request #2022 from rust-lang-nursery/oli-obk-patch-1

Also ignore `continue` statements in `is_unit_expr`

6 years ago`while_let_loop` doesn't take into account break-with-value #1948
Tim Nielens [Tue, 5 Sep 2017 20:28:30 +0000 (22:28 +0200)]
`while_let_loop` doesn't take into account break-with-value #1948

6 years agoAlso ignore `continue` statements in `is_unit_expr`
Oliver Schneider [Tue, 5 Sep 2017 09:25:20 +0000 (11:25 +0200)]
Also ignore `continue` statements in `is_unit_expr`

6 years agofor loops -> for-loops
Manish Goregaokar [Tue, 5 Sep 2017 19:10:53 +0000 (12:10 -0700)]
for loops -> for-loops

6 years agoOnly strip parens for binary expressions.
Dan Gohman [Tue, 5 Sep 2017 11:05:26 +0000 (04:05 -0700)]
Only strip parens for binary expressions.

6 years agoAdd a testcase demonstrating how precedence interacts with the lossless-cast lint.
Dan Gohman [Wed, 30 Aug 2017 23:45:36 +0000 (16:45 -0700)]
Add a testcase demonstrating how precedence interacts with the lossless-cast lint.

6 years agoWhen suggesting `from(x)` for lossless casts, strip parens from `x`.
Dan Gohman [Wed, 30 Aug 2017 23:06:21 +0000 (16:06 -0700)]
When suggesting `from(x)` for lossless casts, strip parens from `x`.

6 years agoUpdate changelog
Manish Goregaokar [Tue, 5 Sep 2017 16:45:14 +0000 (09:45 -0700)]
Update changelog

6 years agoUpdate changelog
Manish Goregaokar [Tue, 5 Sep 2017 16:45:14 +0000 (09:45 -0700)]
Update changelog

6 years agoMerge pull request #2021 from marcusklaas/needless-loop-2
Oliver Schneider [Tue, 5 Sep 2017 16:41:27 +0000 (18:41 +0200)]
Merge pull request #2021 from marcusklaas/needless-loop-2

Add lint to detect manual slice copies

6 years agoAdd lint to detect manual slice copies
Marcus Klaas [Tue, 5 Sep 2017 00:16:34 +0000 (20:16 -0400)]
Add lint to detect manual slice copies

6 years agoRustfmt for_loop.rs and add false positive tests
Oliver Schneider [Tue, 5 Sep 2017 10:53:52 +0000 (12:53 +0200)]
Rustfmt for_loop.rs and add false positive tests

6 years agoRun nightly rustfmt
Oliver Schneider [Tue, 5 Sep 2017 09:33:04 +0000 (11:33 +0200)]
Run nightly rustfmt

6 years agoMerge pull request #2020 from 0xbsec/patch-1
Martin Carton [Mon, 4 Sep 2017 19:29:50 +0000 (21:29 +0200)]
Merge pull request #2020 from 0xbsec/patch-1

Fix "further information" link

6 years agoFix "further information" link
M. Hasbini [Mon, 4 Sep 2017 17:03:51 +0000 (20:03 +0300)]
Fix "further information" link

"further information" link was missing the `v` part from the url.
e.g.
wrong (404 notfound): https://rust-lang-nursery.github.io/rust-clippy/0.0.157/index.html#map_entry
correct: https://rust-lang-nursery.github.io/rust-clippy/v0.0.157/index.html#map_entry

6 years agoVersion Bump
Oliver Schneider [Mon, 4 Sep 2017 15:07:19 +0000 (17:07 +0200)]
Version Bump

6 years agoFix `len_zero` ICE
Oliver Schneider [Mon, 4 Sep 2017 15:05:47 +0000 (17:05 +0200)]
Fix `len_zero` ICE

6 years agoUpdate to latest nightly
Oliver Schneider [Mon, 4 Sep 2017 14:10:36 +0000 (16:10 +0200)]
Update to latest nightly

6 years agoFix dogfood
Manish Goregaokar [Sun, 3 Sep 2017 21:58:27 +0000 (14:58 -0700)]
Fix dogfood

6 years agoRun rustfmt
Manish Goregaokar [Sun, 3 Sep 2017 21:15:15 +0000 (14:15 -0700)]
Run rustfmt

6 years agoFix unit_expr expectations and changelog entry
Manish Goregaokar [Sun, 3 Sep 2017 21:14:07 +0000 (14:14 -0700)]
Fix unit_expr expectations and changelog entry

6 years agoMerge branch 'pr-2016' into HEAD
Manish Goregaokar [Sun, 3 Sep 2017 21:02:16 +0000 (14:02 -0700)]
Merge branch 'pr-2016' into HEAD

6 years agoMention the false positive
Zaki Manian [Sun, 3 Sep 2017 21:01:29 +0000 (14:01 -0700)]
Mention the false positive

6 years agoBump to 0.0.156
Manish Goregaokar [Sun, 3 Sep 2017 20:57:40 +0000 (13:57 -0700)]
Bump to 0.0.156

6 years agoRustup to rustc 1.22.0-nightly (744dd6c1d 2017-09-02) (fixes #2013)
Manish Goregaokar [Sun, 3 Sep 2017 20:55:45 +0000 (13:55 -0700)]
Rustup to rustc 1.22.0-nightly (744dd6c1d 2017-09-02) (fixes #2013)

6 years agoRustfmt tests
Zaki Manian [Sun, 3 Sep 2017 20:46:49 +0000 (13:46 -0700)]
Rustfmt tests

6 years agoFix all the clippy lints
Zaki Manian [Sun, 3 Sep 2017 20:39:49 +0000 (13:39 -0700)]
Fix all the clippy lints

Add false positive tests

6 years agoRemove direct call for Deref
Zaki Manian [Sun, 3 Sep 2017 19:50:02 +0000 (12:50 -0700)]
Remove direct call for Deref

Remove "assigns" from the lint

6 years agoRustFmt file and tests
Zaki Manian [Sun, 3 Sep 2017 18:19:59 +0000 (11:19 -0700)]
RustFmt file and tests

6 years agoDon't trigger lint on break or return
Zaki Manian [Sun, 3 Sep 2017 18:17:20 +0000 (11:17 -0700)]
Don't trigger lint on break or return

6 years agoMore relevant tests
Zaki Manian [Sun, 3 Sep 2017 17:39:28 +0000 (10:39 -0700)]
More relevant tests

6 years agoImprove the lint message
Zaki Manian [Sun, 3 Sep 2017 16:52:28 +0000 (09:52 -0700)]
Improve the lint message

6 years agoUpdate unit tests
Zaki Manian [Sun, 3 Sep 2017 16:12:55 +0000 (09:12 -0700)]
Update unit tests

6 years agoearly tests
Zaki Manian [Sun, 3 Sep 2017 15:56:34 +0000 (08:56 -0700)]
early tests

6 years agoFix false positives in assignment inside the else condition
Zaki Manian [Sun, 3 Sep 2017 15:31:15 +0000 (08:31 -0700)]
Fix false positives in assignment inside the else condition

6 years agoRustFmt changes
Zaki Manian [Sun, 3 Sep 2017 04:33:26 +0000 (21:33 -0700)]
RustFmt changes

6 years agoSwitch back to manual deref
Zaki Manian [Sun, 3 Sep 2017 03:45:40 +0000 (20:45 -0700)]
Switch back to manual deref

6 years agoImproved spans for lints and support match expressions
Zaki Manian [Sun, 3 Sep 2017 03:36:24 +0000 (20:36 -0700)]
Improved spans for lints and support match expressions

6 years agoHandle method calls
Zaki Manian [Sat, 2 Sep 2017 22:04:52 +0000 (15:04 -0700)]
Handle method calls

6 years agoFix brace indentation
Zaki Manian [Sat, 2 Sep 2017 21:20:22 +0000 (14:20 -0700)]
Fix brace indentation

6 years agoCheck method calls
Zaki Manian [Sat, 2 Sep 2017 21:19:45 +0000 (14:19 -0700)]
Check method calls

6 years agoMore initial work
Zaki Manian [Sat, 2 Sep 2017 21:09:41 +0000 (14:09 -0700)]
More initial work

6 years agoIntroduce check_stmt
Zaki Manian [Sat, 2 Sep 2017 19:20:43 +0000 (12:20 -0700)]
Introduce check_stmt

6 years agoUse the type from the macro
Zaki Manian [Sat, 2 Sep 2017 18:29:01 +0000 (11:29 -0700)]
Use the type from the macro

6 years agoInitial commit of unit expr
Zaki Manian [Sat, 2 Sep 2017 18:25:33 +0000 (11:25 -0700)]
Initial commit of unit expr

6 years agoMerge pull request #2010 from rust-lang-nursery/doc_improvements
Oliver Schneider [Sat, 2 Sep 2017 05:22:21 +0000 (07:22 +0200)]
Merge pull request #2010 from rust-lang-nursery/doc_improvements

some small doc improvements

6 years agoMerge pull request #2009 from rust-lang-nursery/mcarton-patch-1
Oliver Schneider [Sat, 2 Sep 2017 05:12:25 +0000 (07:12 +0200)]
Merge pull request #2009 from rust-lang-nursery/mcarton-patch-1

Move the number of lints back to the top of README

6 years agosome small doc improvements
Andre Bogus [Fri, 1 Sep 2017 20:43:34 +0000 (22:43 +0200)]
some small doc improvements

6 years agoMove the number of lints back to the top of README
Martin Carton [Fri, 1 Sep 2017 18:29:36 +0000 (20:29 +0200)]
Move the number of lints back to the top of README

This used to be at the top and was moved at the bottom when the big list of lints started to be so ridiculously long that people had to scroll for 10 minutes to have usage information :smile:

6 years agoMerge pull request #2008 from rust-lang-nursery/oli-obk-patch-1
Oliver Schneider [Fri, 1 Sep 2017 16:59:28 +0000 (18:59 +0200)]
Merge pull request #2008 from rust-lang-nursery/oli-obk-patch-1

Remove clippy.bashy.io badge

6 years agoRemove clippy.bashy.io
Oliver Schneider [Fri, 1 Sep 2017 13:14:49 +0000 (15:14 +0200)]
Remove clippy.bashy.io

The service seems to be defunct for a while now

6 years agoMerge pull request #2007 from rust-lang-nursery/wiki
Oliver Schneider [Fri, 1 Sep 2017 13:07:14 +0000 (15:07 +0200)]
Merge pull request #2007 from rust-lang-nursery/wiki

Deprecate the wiki and remove the lint list from the README (fixes #1933)

6 years agoUpdate README lint counter message
Oliver Schneider [Fri, 1 Sep 2017 08:36:20 +0000 (10:36 +0200)]
Update README lint counter message

6 years agoLink to current versions docs instead of master docs
Oliver Schneider [Fri, 1 Sep 2017 08:35:58 +0000 (10:35 +0200)]
Link to current versions docs instead of master docs

6 years agowiki -> docs
Oliver Schneider [Fri, 1 Sep 2017 08:29:49 +0000 (10:29 +0200)]
wiki -> docs