about summary refs log tree commit diff
path: root/clippy_lints/src
AgeCommit message (Collapse)AuthorLines
2020-01-19Treat more strange patternYuki Okushi-18/+11
2020-01-19Apply review commentsYuki Okushi-14/+13
2020-01-19Run `update_lints`Yuki Okushi-3/+3
2020-01-19Reduce span rangeYuki Okushi-12/+13
2020-01-19Rename `ok_if_let` to `if_let_some_result`Yuki Okushi-5/+5
2020-01-19Apply review commentsYuki Okushi-5/+6
2020-01-19Add suggestion in `if_let_some_result`Yuki Okushi-7/+26
2020-01-18Auto merge of #5065 - matthiaskrgr:rustup_28, r=matthiaskrgrbors-1/+0
rustup https://github.com/rust-lang/rust/pull/67712 slice_patterns have been stabilized. changelog: none
2020-01-18rustup https://github.com/rust-lang/rust/pull/67712Matthias Krüger-1/+0
slice_patterns have been stabilized.
2020-01-18Auto merge of #5046 - JohnTitor:order-nonminimal-bool, r=flip1995bors-1/+1
Keep the ordering in `nonminimal_bool` lint I believe it shouldn't cause any regression but feel free to let me know if you have a doubtful example. Also, splits up `booleans` ui test. Fixes #5045 changelog: none
2020-01-18Auto merge of #5063 - JohnTitor:allow-correctly, r=flip1995bors-6/+9
Allow `unused_self` lint at the function level Another approach of #5062. Fixes #5053 changelog: Allow `unused_self` lint at the function level
2020-01-18Allow `unused_self` lint at the function levelYuki Okushi-6/+9
2020-01-18Downgrade range_plus_one to pedanticAndre Bogus-3/+6
2020-01-18Rustup to rust-lang/rust#68204Yuki Okushi-28/+75
2020-01-15Add lint for default lint descriptionBrad Sherman-4/+50
- Lint for any new lints that have the default lint description from the automation
2020-01-15Auto merge of #5034 - ThibsG:MatchWildErrArmImprove5024, r=flip1995bors-67/+88
Match wild err arm improvements This lint should trigger on other identifiers which have `_` prefix (such as `_e`) and only if they are unused in the panic block. _Note_: the `is_unused` function is greatly inspired from `pat_is_wild` function in [loops lints](https://github.com/rust-lang/rust-clippy/blob/43ac9416d935942d6c7d2b2e0c876c551652c4ec/clippy_lints/src/loops.rs#L1689). I've been considering doing some refactoring, maybe in utils. Maybe this PR or a new one. What do you think ? fixes #5024 changelog: none
2020-01-14Omit doc safety/errors header checking for mainAndre Bogus-2/+4
2020-01-13Auto merge of #4543 - xiongmao86:issue4503, r=flip1995bors-0/+71
Fix issue4503 Fixes #4503. changelog: Add a lint checking user are using FileType.is_file() method and suggest using !FileType.is_dir(). - [x] Followed [lint naming conventions][lint_naming] - [x] Added passing UI tests (including committed `.stderr` file) - [x] `cargo test` passes locally - [x] Executed `./util/dev update_lints` - [x] Added lint documentation - [x] Run `./util/dev fmt`
2020-01-14Fix the ordering on `nonminimal_bool`Yuki Okushi-1/+1
2020-01-13Extract visitor to utilsThibsG-88/+62
2020-01-13Change note messageThibsG-3/+2
2020-01-13Fix formattingThibsG-6/+7
2020-01-13Better binding name on Err for noteThibsG-26/+36
2020-01-13Match underscore-prefixed variable alsoThibsG-4/+41
2020-01-13Rustup to rust-lang/rust#68045Yuki Okushi-173/+201
2020-01-12Update lints again.xiongmao86-1/+1
2020-01-12Fix grammar error.xiongmao86-4/+4
2020-01-12Update clippy_lints/src/methods/mod.rsRui-1/+1
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2020-01-12Change lint message.xiongmao86-6/+15
2020-01-12./util/dev update_lints.xiongmao86-2/+1
2020-01-12Fix documents and messages.Rui-4/+4
Update clippy_lints/src/methods/mod.rs
2020-01-12Extend spans to include !.xiongmao86-1/+1
2020-01-12Add lint logic.xiongmao86-0/+25
2020-01-12Declare lint.xiongmao86-0/+38
2020-01-12Remove referencesYuki Okushi-3/+3
2020-01-12Rustup to rust-lang/rust#67000Yuki Okushi-62/+29
2020-01-11Apply review commentsYuki Okushi-35/+16
2020-01-11Rustup to rust-lang/rust#67806Yuki Okushi-449/+299
2020-01-11Apply review commentsYuki Okushi-26/+47
2020-01-11Rustup to rust-lang/rust#68101Yuki Okushi-6/+3
2020-01-11Rustup to rust-lang/rust#67258Yuki Okushi-15/+28
2020-01-09Detect usage of invalid atomic ordering in memory fencesKrishna Sai Veera Reddy-33/+64
Detect usage of `core::sync::atomic::{fence, compiler_fence}` with `Ordering::Relaxed` and suggest valid alternatives.
2020-01-09Lint vectored IO in unused_io_amount lintShotaro Yamada-10/+15
2020-01-09Auto merge of #4960 - ThibsG:patterns_with_wildcard_#4640, r=flip1995bors-2/+45
New lint: pats_with_wild_match_arm Wildcard use with other pattern in same match arm. The wildcard covers other(s) pattern(s) as it will match anyway. changelog: add new lint when multiple patterns (including wildcard) are used in a match arm. Fixes #4640.
2020-01-09Rustup to rust-lang/rust#67979Yuki Okushi-88/+200
2020-01-09Rustup to rust-lang/rust#67781Yuki Okushi-1/+1
2020-01-08Auto merge of #5022 - flip1995:useless_attr, r=phanschbors-2/+11
Fix useless_attribute suggestion Fixes #5021 changelog: Fix [`useless_attribute`] suggestion, which tripped rustfix
2020-01-08Fix useless attribute suggestionflip1995-2/+11
2020-01-08Auto merge of #5017 - sinkuu:mir_no_opt_fallout, r=flip1995bors-0/+7
Fix redundant_clone lint not working with PathBuf and OsString https://github.com/rust-lang/rust-clippy/pull/4825 diabled MIR optimization in clippy, including `rustc_mir::transform::InstCombine` which reduces `&(*x)` to `x`. This PR tries to unwrap `&*` when looking into `mir::Rvalue`s. Fixes #5014. --- changelog: fixed `redundant_clone` lint not working with `PathBuf` and `OsString`
2020-01-08Auto merge of #5015 - ↵bors-2/+3
krishna-veerareddy:change-float-to-int-transmute-category, r=flip1995 Move `transmute_float_to_int` lint to `complexity` `transmute_float_to_int` lint was accidentally added to nursery so moving it to the complexity group. changelog: Move `transmute_float_to_int` out of nursery