about summary refs log tree commit diff
path: root/clippy_lints/src/formatting.rs
AgeCommit message (Collapse)AuthorLines
2020-01-27Rename `span_note_and_lint` to `span_lint_and_note`Yuki Okushi-5/+5
2020-01-27Rename `span_help_and_lint` to `span_lint_and_help`Yuki Okushi-2/+2
2020-01-25dont fire possible_missing_comma if intendation is presentMikhail Babenko-16/+22
2020-01-13Rustup to rust-lang/rust#68045Yuki Okushi-1/+2
2020-01-11Rustup to rust-lang/rust#67806Yuki Okushi-3/+2
2019-12-24rustup "Add span information to `ExprKind::Assign`"Lzu Tao-1/+1
2019-12-04Rustup to rust-lang/rust#66878Matthias Krüger-1/+2
2019-10-14new lints around `#[must_use]` fnsAndre Bogus-0/+1
`must_use_unit` lints unit-returning functions with a `#[must_use]` attribute, suggesting to remove it. `double_must_use` lints functions with a plain `#[must_use]` attribute, but which return a type which is already `#[must_use]`, so the attribute has no benefit. `must_use_candidate` is a pedantic lint that lints functions and methods that return some non-unit type that is not already `#[must_use]` and suggests to add the annotation.
2019-10-09New lint: suspicious_unary_op_formattingNikos Filippakis-1/+64
Lints when, on the RHS of a BinOp, there is a UnOp without a space before the operator but with a space after (e.g. foo >- 1). Signed-off-by: Nikos Filippakis <nikolaos.filippakis@cern.ch>
2019-09-27Rustup to rust-lang/rust#64813flip1995-8/+8
2019-08-19Remove in_macro_or_desugarKRAAI, MATTHEW [VISUS]-4/+4
2019-06-24Simplify unsugar_if to just an if expr checkflip1995-12/+12
2019-06-24Remove ast:: prefix from typesflip1995-20/+20
2019-06-24Put 'if let' back into comment.Mazdak Farrokhzad-1/+1
2019-06-23Fix fallout from rust-lang/rust PR 60861.Mazdak Farrokhzad-4/+2
2019-05-11Rename in_macro to in_macro_or_desugarManish Goregaokar-4/+4
2019-04-17Use lint pass macrosMatthew Kraai-17/+6
Fixes #3917.
2019-04-14cargo fmtPhilipp Hansch-3/+2
2019-04-14Refactor suspicious_else_formatting using if_chainPhilipp Hansch-35/+32
2019-04-14Remove `except` in suspicious_else_formattingPhilipp Hansch-16/+16
This was causing two different ICEs in #3741. The first was fixed in #3925. The second one is fixed with this commit: We just don't `expect` anymore. If the snippet doesn't contain an `else`, we stop emitting the lint because it's not a suspiciously formatted else anyway.
2019-04-08cargo fmtPhilipp Hansch-2/+3
2019-04-07Fix ICE in suspicious_else_formattingPhilipp Hansch-2/+2
2019-03-05move lint documentation into macro invocationsAndy Russell-56/+56
2019-01-27rustup https://github.com/rust-lang/rust/pull/57726Matthias Krüger-0/+4
2019-01-08Remove all copyright license headersPhilipp Hansch-9/+0
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2018-12-29Remove crate:: prefixes from crate pathsKonrad Borowski-4/+4
This is somewhat misleading, as those are actually external crates, and don't need a crate:: prefix.
2018-12-20Workaround rust-lang/rust#43081HMPerson1-0/+5
2018-12-20Teach `suspicious_else_formatting` about `if .. {..} {..}`HMPerson1-17/+50
2018-11-27Run rustfmt on clippy_lintsflip1995-12/+8
2018-11-06Remove `+` from `has_unary_equivalent`Michael Wright-3/+2
Rust doesn't has a unary + operator!
2018-11-04Fix `collapsible_if` errorMichael Wright-15/+13
2018-11-04Fix `possible_missing_comma` false positivesMichael Wright-13/+23
`possible_missing_comma` should only trigger when the binary operator has unary equivalent. Otherwise, it's not possible to insert a comma without breaking compilation. The operators identified were `+`, `&`, `*` and `-`. This fixes the specific examples given in issues #3244 and #3396 but doesn't address the conflict this lint has with the style of starting a line with a binary operator.
2018-10-06Add license header to Rust filesManish Goregaokar-0/+10
2018-09-15Reintroduce `extern crate` for non-Cargo dependencies.Eduard-Mihai Burtescu-4/+4
2018-08-29Switch to declare_tool_lint macroflip1995-1/+1
2018-08-28Update imports and rustupOliver Schneider-1/+1
2018-07-23RustupOliver Schneider-6/+6
2018-07-19Remove import of rustcManish Goregaokar-0/+1
2018-05-30Run rustfixMateusz Mikuła-1/+1
2018-03-29Address review commentsOliver Schneider-1/+1
2018-03-28Categorize all the lints!Oliver Schneider-6/+6
2017-11-05Cargo fmttopecongiro-2/+2
2017-09-05Run nightly rustfmtOliver Schneider-8/+9
2017-08-31Accessing `Span` internals is deprecatedOliver Schneider-31/+6
2017-08-14RustfmtOliver Schneider-34/+54
2017-04-12Run rustfmtOliver Schneider-8/+32
2017-04-01Remove unused cs parameter for is_macro and friendsEnrico Schmitz-3/+3
2017-03-31First try for a fix for rustc 1.18.0-nightly (5c94997b6 2017-03-30Enrico Schmitz-8/+7
2017-02-16typos: coma -> commaBen Boeckel-1/+1
2017-02-05Fix lint name in comment tooBood Qian-1/+1