Evan Simmons
9b14ad493b
New excessive precision lint for floats
2018-04-24 15:18:23 -07:00
Michael Recachinas
54c0edcfe8
Add smaller check_unformatted to write.rs and fix precision,width,align false positive
2018-04-21 19:51:58 +01:00
Oliver Schneider
c5b39a5917
Version bump
2018-04-19 08:36:22 +02:00
Oliver Schneider
f786a36949
Rustup
2018-04-17 10:52:25 +02:00
Oliver Schneider
ae3213747d
Merge pull request #1467 from philipturnbull/option_map_nil_fn
...
Lint `Option.map(f)` where f returns unit
2018-04-15 16:14:25 +02:00
Philipp Hansch
26b9911e07
Refactor out enum and address nits
2018-04-15 15:37:11 +02:00
Oliver Schneider
9dc9487567
Version bump
2018-04-15 15:01:48 +02:00
MSI\Stew's Laptop
d175c797e5
fixing error message for empty println macro
2018-04-15 14:00:28 +02:00
Philipp Hansch
4f4e20c561
Also lint Result.map for unit returns
2018-04-15 13:59:57 +02:00
Philipp Hansch
8307a899e9
Rename option_map_unit_fn to map_unit_fn
2018-04-15 13:01:10 +02:00
Philipp Hansch
d54f70f1f6
Generate let binding variable name for some cases
...
Given a map call like `x.field.map ...` the suggestion will contain:
`if let Some(x_field) ...`
Given a map call like `x.map ...` the suggestion will contain:
`if let Some(_x) ...`
Otherwise it will suggest: `if let Some(_) ...`
2018-04-15 13:01:10 +02:00
Philipp Hansch
d87385b406
Use approximate_suggestion for non-reducible closures
2018-04-15 13:01:10 +02:00
Philipp Hansch
7de707fdba
Remove further semicolon reduction
2018-04-15 13:01:10 +02:00
Philipp Hansch
a3ff21f4d6
Rename lint to option_map_unit_fn
...
Rust does not have nil.
2018-04-15 13:01:09 +02:00
Philipp Hansch
fbd71f901f
Use declare_clippy_lint and 'complexity' category
2018-04-15 13:01:09 +02:00
Philipp Hansch
ca60e8a2a0
Cleanup misc::check_nan
...
This was a bit messed up after a bigger rebase.
2018-04-15 13:01:09 +02:00
Philipp Hansch
991a30237a
Make it compile again
2018-04-15 13:01:09 +02:00
Phil Turnbull
d0bdfe5ce3
Handle non-trivial nil closures
...
`reduce_nil_closure` mixed together a) 'is this a nil closure?' and b) 'can it
be reduced to a simple expression?'. Split the logic into two functions so we
can still generate a basic warning when the closure can't be simplified.
2018-04-15 13:01:09 +02:00
Phil Turnbull
2f52d1d568
Return Spans instead of Cow<&str>'s
2018-04-15 13:01:09 +02:00
Phil Turnbull
30f2480fd8
Lint closures that return nil
2018-04-15 13:01:09 +02:00
Phil Turnbull
302f5d05f5
Lint Option.map(f)
where f never returns
2018-04-15 13:01:09 +02:00
Phil Turnbull
e5ecbb55ee
Lint Option.map(f)
where f returns nil
2018-04-15 13:01:09 +02:00
Oliver Schneider
b2e4b88d18
Merge pull request #2662 from mikerite/issue_2546
...
Fix useless_format false negative
2018-04-15 11:57:57 +02:00
Michael Wright
d171e8987e
Fix clippy error
2018-04-15 05:20:30 +02:00
Michael Wright
a9c8d1bd90
Fix compilation for nightly 2018-04-15
...
This only fixes compilation and the build. It's possible that the `author`
and `inspector` lints are broken but there are no failing tests.
Closes #2667
2018-04-15 05:01:43 +02:00
Stefano Probst
01faa906d2
Fix Markdown link syntax in lint doc
...
Currently this link is wrong rendered. See https://rust-lang-nursery.github.io/rust-clippy/v0.0.193/index.html#iter_next_loop
2018-04-14 11:35:52 +02:00
Michael Wright
c7ad71ccf2
Fix clippy warnings
2018-04-12 08:50:42 +02:00
Michael Wright
6ae617b313
Fix useless_format false negative
...
Closes #2546
2018-04-12 08:21:03 +02:00
Oliver Schneider
8ec61a613a
Merge pull request #2661 from devonhollowood/ptr-ptr-casts
...
Replace `misaligned_transmute` lint
2018-04-11 13:23:15 +02:00
Devon Hollowood
b77d74030b
Deprecate misaligned_transmute
2018-04-11 02:50:04 -07:00
Devon Hollowood
c6bc682325
Fix misaligned_transmute lint
...
This is done by adding two new lints: cast_ptr_alignment and
transmute_ptr_to_ptr. These will replace misaligned_transmute.
2018-04-11 02:17:59 -07:00
Oliver Schneider
0692b2bb92
Temporarily disable the needless_borrow lint
2018-04-08 11:13:46 +02:00
Oliver Schneider
d247d9c690
Merge pull request #2645 from TimNN/regex-bytes-utf8
...
Allow invalid UTF-8 in bytes Regexes
2018-04-08 08:58:38 +02:00
Evan Simmons
d712991917
New lints for write! / writeln! macros.
2018-04-07 22:45:26 -07:00
Tim Neumann
fad826f966
allow invalid UTF-8 in bytes Regexes
2018-04-07 22:18:51 +02:00
Philipp Hansch
90e7d93d6c
Fix nonminimal_bool false positive
...
It was checking any is_ok, is_err, is_some, is_none method for negation
but it should only perform the check for the built-in types, not custom
types.
2018-04-07 12:52:59 +02:00
Oliver Schneider
fbb5050d82
Merge pull request #2641 from rcoh/patch-2
...
Update hash_xor_eq docs to match behavior
2018-04-07 09:42:54 +02:00
Russell Cohen
4b3326efd0
Fix docs to match behavior
2018-04-06 22:44:25 -07:00
Michael Wright
fe8068c41b
Fix compilation for nightly 2018-04-06
...
Breakages for introduced by rust pull request
'AST: Give spans to all identifies' - rust-lang/rust/pull#49154
Closes #2639
2018-04-07 07:32:30 +02:00
Oliver Schneider
62d595b3dc
Merge pull request #2632 from phansch/fix_useless_format_false_positive
...
Fix useless_format false positive with macros
2018-04-05 09:59:12 +02:00
Philipp Hansch
ff98e3f9f5
Fix useless_format false positive with macros
...
Clippy was issuing a warning when `format!` was used inside a macro.
That's a problem because macros have different syntax and can be outside
the control of the user.
This skips the `useless_format` check if the `format!` call is inside a
macro.
2018-04-05 07:52:26 +02:00
Manish Goregaokar
2046694029
Bump version to 0.0.192
2018-04-04 18:00:21 -07:00
Manish Goregaokar
51336711d3
Remove uses of ExprKind::Inplace
2018-04-04 17:56:44 -07:00
flip1995
cecfdeab19
Don't trigger while_immutable_condition for mutable fields of tuples/structs
2018-04-03 16:41:30 +02:00
Oliver Schneider
90fcdafb79
Merge pull request #2608 from mrecachinas/feature/print-string-literal
...
Check for literals as println! args
2018-04-02 23:34:17 +02:00
Michael Recachinas
d504290839
Add edge case with env! arg to test and known problems
2018-04-02 21:14:29 +01:00
Philipp Hansch
b1b0b36cc0
Document the author lint
2018-04-02 14:55:00 +02:00
Michael Wright
e91404bcc3
Fix clippy warning
2018-04-02 07:35:13 +02:00
Michael Wright
0fbcb30303
Merge branch 'master' into dogfood_target_dir
2018-04-02 07:28:10 +02:00
Michael Wright
fcabbeb251
Fix clippy warning
...
Fix too_many_arguments on `check_general_case` by allowing it. I can't
see a sensible way of grouping the parameters.
2018-04-02 07:04:43 +02:00