about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-02-04Merge fixesThibsG-1/+1
2020-02-04Use span_lint_and_sugg + move infaillible lintThibsG-1/+8
- moving infaillible lint to prevent collisions
2020-01-31Move debug_assertions_with_mut_call to nurseryflip1995-1/+1
2020-01-31Auto merge of #5109 - phansch:ciao_util_dev, r=flip1995bors-1/+1
Deprecate util/dev in favor of cargo alias This means one less shell script and a bit more cross-platform support for contributors. If you've been using `./util/dev` before, this now becomes `cargo dev`. The key part of this change is found in `.cargo/config` where an alias for calling the `clippy_dev` binary is defined. changelog: none
2020-01-30Deprecate util/dev in favor of cargo aliasPhilipp Hansch-1/+1
If you've been using `./util/dev` before, this now becomes `cargo dev`. The key part of this change is found in `.cargo/config`. This means one less shell script and a bit more cross-platform support for contributors.
2020-01-30decouple 'let_underscore' testsMikhail Babenko-1/+1
2020-01-30add lintMikhail Babenko-0/+7
2020-01-30Declare lint and implement lint logic.xiongmao86-1/+8
2020-01-23add `option_as_ref_deref` lintAreredify-1/+8
2020-01-21Auto merge of #5028 - krishna-veerareddy:issue-5026-mem-ordering-fences, ↵bors-1/+1
r=phansch Detect usage of invalid atomic ordering in memory fences Detect usage of `core::sync::atomic::{fence, compiler_fence}` with `Ordering::Relaxed` and suggest valid alternatives. changelog: Extend `invalid_atomic_ordering` to lint memory fences Fixes #5026
2020-01-20Add `skip_while_next` lintYuki Okushi-1/+8
2020-01-19Rename `ok_if_let` to `if_let_some_result`Yuki Okushi-1/+1
2020-01-18Downgrade range_plus_one to pedanticAndre Bogus-1/+1
2020-01-12Pull master, rebase, and update_lints again.xiongmao86-1/+1
2020-01-12./util/dev update_lints.xiongmao86-2/+2
2020-01-12Declare lint.xiongmao86-0/+7
2020-01-09Detect usage of invalid atomic ordering in memory fencesKrishna Sai Veera Reddy-1/+1
Detect usage of `core::sync::atomic::{fence, compiler_fence}` with `Ordering::Relaxed` and suggest valid alternatives.
2020-01-09Auto merge of #4960 - ThibsG:patterns_with_wildcard_#4640, r=flip1995bors-1/+8
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#68024Yuki Okushi-1/+0
2020-01-07Move `transmute_float_to_int` lint to `complexity`Krishna Sai Veera Reddy-1/+1
`transmute_float_to_int` lint was accidentally added to nursery so moving it to the complexity group.
2020-01-07Span help without suggestionThibsG-1/+1
2020-01-07Change lint name to WILDCARD_IN_OR_PATTERNSThibsG-7/+7
2020-01-07Move to complexity and adapt testThibsG-1/+1
- test wildcard_enum_match_arm has been impacted by this new lint
2020-01-07New lint: pats_with_wild_match_armThibsG-0/+7
- Wildcard use with other pattern in same match arm
2020-01-07Apply suggestion from code reviewYuki Okushi-1/+1
2020-01-07Update lintlistYuki Okushi-32/+32
2020-01-06Prevent doc-tests from running and fix lint descriptionKrishna Sai Veera Reddy-1/+1
2020-01-06Add lint to detect usage of invalid atomic orderingKrishna Sai Veera Reddy-1/+8
Detect usage of invalid atomic ordering modes such as `Ordering::{Release, AcqRel}` in atomic loads and `Ordering::{Acquire, AcqRel}` in atomic stores.
2020-01-04Add lint for iter.nth(0)Brad Sherman-1/+8
- Encourage iter.next() rather than iter.nth(0), which is less readable
2019-12-31Indicate anonymous lifetimes for typesKrishna Veera Reddy-1/+1
2019-12-31Move `mem_replace_with_default` out of nurseryKrishna Veera Reddy-1/+1
2019-12-31Use `mem::take` instead of `mem::replace` when applicableKrishna Veera Reddy-0/+7
`std::mem::take` can be used to replace a value of type `T` with `T::default()` instead of `std::mem::replace`.
2019-12-28Add new lint (modulo_arithmetic)mgr-inz-rafal-1/+8
2019-12-24Auto merge of #4885 - rust-lang:mut-key-types, r=flip1995bors-1/+8
new lint: mutable_key_type This fixes #732 - well, partly, it doesn't adress `Hash` impls, but the use of mutable types as map keys or set members changelog: add `mutable_key_type` lint r? @flip1995
2019-12-24new lint: mutable_key_typeAndre Bogus-1/+8
2019-12-24do minor cleanupsLzu Tao-40/+29
* ToString and AsRef are in prelude, no need to import them
2019-12-22implemented `let_underscore` lintMikhail Babenko-1/+8
actually add files update lints change to pedantic
2019-12-21Deprecate unused_label lintflip1995-8/+1
This lint was uplifted/turned into warn-by-default in rustc
2019-12-20Update lints for `iterator_step_by_zero` changesMichael Wright-1/+1
2019-12-18Fix `iterator_step_by_zero` definitionMichael Wright-1/+1
2019-12-16Fix clippy build failureKrishna Veera Reddy-1/+0
Clippy build fails because the feature `result_map_or` has been stabilized in v1.41.0 but we still have an explicit feature attribute for it.
2019-12-07Add lint to detect transmutes from float to integerKrishna Veera Reddy-1/+8
Add lint that detects transmutation from a float to an integer and suggests usage of `{f32, f64}.to_bits()` instead.
2019-12-06Add lint for pub fns returning a `Result` without documenting errorsRobbieClarken-1/+8
The Rust Book recommends that functions that return a `Result` type have a doc comment with an `# Errors` section describing the kind of errors that can be returned (https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#commonly-used-sections). This change adds a lint to enforce this. The lint is allow by default; it can be enabled with `#![warn(clippy::missing_errors_doc)]`. Closes #4854.
2019-11-29Feed the dogPhilipp Hansch-1/+1
2019-11-29Update custom ICE function with latest rustcPhilipp Hansch-1/+1
2019-11-29Use Clippy version in ICE messagePhilipp Hansch-1/+3
2019-11-29Add custom ICE message that points to Clippy repoPhilipp Hansch-1/+62
This utilizes https://github.com/rust-lang/rust/pull/60584 by setting our own `panic_hook` and pointing to our own issue tracker instead of the rustc issue tracker. This also adds a new internal lint to test the ICE message. **Potential downsides** * This essentially copies rustc's `report_ice` function as `report_clippy_ice`. I think that's how it's meant to be implemented, but maybe @jonas-schievink could have a look as well =) The downside of more-or-less copying this function is that we have to maintain it as well now. The original function can be found [here][original]. * `driver` now depends directly on `rustc` and `rustc_errors` Closes #2734 [original]: https://github.com/rust-lang/rust/blob/59367b074f1523353dddefa678ffe3cac9fd4e50/src/librustc_driver/lib.rs#L1185
2019-11-29Auto merge of #4863 - phansch:use_self, r=flip1995bors-1/+1
Move use_self to nursery Closes #4859 We have a lot of false positives in this lint, so I think it makes sense to move this to the nursery until they are resolved. changelog: Move `use_self` lint to nursery, due to many false positives
2019-11-29Move use_self to nurseryPhilipp Hansch-1/+1
Closes #4859 We have a lot of false positives in this lint, so I think it makes sense to move this to the nursery until they are resolved. changelog: Move `use_self` lint to nursery, due to many false positives
2019-11-28Don't error on clippy.toml of dependenciesflip1995-3/+2