about summary refs log tree commit diff
path: root/src/tools/clippy
AgeCommit message (Collapse)AuthorLines
2020-05-03Update clippy lintDylan MacKenzie-1/+1
2020-05-02Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24a96cd369'Oliver Scherer-0/+114475
git-subtree-dir: src/tools/clippy git-subtree-mainline: 06c44816c1532e5ff08ad072f581fc068eb60e2e git-subtree-split: d2708873ef711ec8ab45df1e984ecf24a96cd369
2020-05-02Delete the clippy submoduleOliver Scherer-11/+0
2020-04-29Update Clippyflip1995-7/+7
2020-04-26submodules: update clippy from 891e1a85 to b7c802b5Matthias Krüger-10/+8
Changes: ```` rustup to https://github.com/rust-lang/rust/pull/70043 map_clone: avoid suggesting `copied()` for &mut fix redundant_pattern_matching lint Add tests for #1654 Don't trigger while_let_on_iterator when the iterator is recreated every iteration Update issue_2356.stderr reference file Update while_let_on_iterator tests Fix while_let_on_iterator suggestion and make it MachineApplicable Add lifetime test case for `new_ret_no_self` rustup https://github.com/rust-lang/rust/pull/71215/ Downgrade match_bool to pedantic Run fetch before testing if master contains beta The beta branch update should not require a force push Add a note to the beta sections of release.md Remove apt-get upgrade again Always use the deploy script and templates of the master branch README: fix lit count line clippy_dev: make it fatal when the regex for updating lint count does not match `predecessors_for` will be removed soon Rustup "Remove `BodyAndCache`" Only run (late) internal lints, when they are warn/deny/forbid Only run cargo lints, when they are warn/deny/forbid span_lint_and_note now takes an Option<Span> for the note_span instead of just a span Make lint also capture blocks and closures, adjust language to mention other mutex types don't test the code in the lint docs Switch to matching against full paths instead of just the last element of the path Lint for holding locks across await points Also mention `--fix` for nightly users fix crash on issue-69020-assoc-const-arith-overflow.rs Address review comments remark fixes Update CHANGELOG.md for Rust 1.43 and 1.44 update stderr file util/fetch_prs_between.sh: Add Markdown formatted Link factor ifs into function, add differing mutex test Update the changelog update documentation Apply suggestions from PR review update span_lint_and_help call to six args test for mutex eq, add another test case use if chain cargo dev fmt fix map import to rustc_middle dev update_lints fix internal clippy warnings change visitor name to OppVisitor use Visitor api to find Mutex::lock calls add note about update-all-refs script, revert redundant pat to master move closures to seperate fns, remove known problems use span_lint_and_help, cargo dev fmt creating suggestion progress work on suggestion for auto fix Implement unsafe_derive_deserialize lint Update empty_enum.stderr Formatting and naming Formatting and naming Cleanup: `node_id` -> `hir_id` Fix issue #2907. Don't trigger toplevel_ref_arg for `for` loops Cleanup: future_not_send: use `return_ty` method Remove badge FIXME from Cargo.toml Change note_span argument for span_lint_and_note. Add an Option<Span> argument to span_lint_and_help. Fixes internal lint warning in code base. Implement collapsible_span_lint_calls lint. ```` Fixes #71453
2020-04-18submodules: update clippy from 6651c1b9 to 891e1a85Matthias Krüger-20/+10
Changes: ```` Polished lint and tests Added final lint and tests Added basic lint and tests fix redundant_pattern_matching lint add lint futures_not_send Integrate more idiomatic rust changes. Fix issue #4892. cargo dev fmt Cleanup: Rename 'db' variable to 'diag' question_mark: don't add `as_ref()` for a call expression unit_arg suggestion may be incorrect readme: update to cargo clippy --fix command CI: performing system upgrade fixes broken apt deps on ubuntu 32bit Do not lint in macros for match lints [fix] Minor typo in GH Actions 'clippy_dev' Reenable rustfmt integration test Add test to map_flatten with an Option Lint map_flatten if caller is an Option Apply suggestions from code review manually fixing formatting at this point lol fmt rename field revert the damn fmt changes add some tests split it up for testing but the merge broke tests dogfood tasted bad fix rustfmt issue boycott manish check for unstable options Start work on clippy-fix as subcommand ````
2020-04-15submodules: update clippy from af5940b7 to 6651c1b9Matthias Krüger-13/+17
Changes: ```` Rename dummy_hir_id -> parent_hir_id rustup https://github.com/rust-lang/rust/pull/71116 Change default many single char names threshold Better precedence case management + more tests Use only check_expr with parent expr and precedence Check for Deref trait impl + add fixed version Report using stmts and expr + tests Global rework + fix imports Working basic dereference clip Add test for zero single char names Make the single char threshold strict inequality large_enum_variant: Report sizes of variants Refactor: Use rustc's `match_def_path` deps: bump compiletest-rs from 0.4 to 0.5 rustup https://github.com/rust-lang/rust/pull/70643 Explain panic on `E0463` in integration tests Temporarily disable rustfmt integration test result_map_unit_fn: Fix incorrect UI tests Cleanup: Use rustc's is_proc_macro_attr Cleanup: Use our `sym!` macro more Fixes #5405: redundant clone false positive with arrays Disallow bit-shifting in `integer_arithmetic` lint update lints cargo dev fmt Make use of Option/Result diagnostic items Make use of some existing diagnostic items Say that diagnostic items are preferred over paths verbose_bit_mask: fix bit mask used in docs Update documentation for new_ret_no_self Update doc generation script Add lint on large const arrays Make the epsilon note spanless Split check_fn function Indicate when arrays are compared in error message Make epsilon note spanless when comparing arrays Add float cmp const tests for arrays Add float cmp tests for arrays Handle constant arrays with single value Don't show comparison suggestion for arrays Allow for const arrays of zeros Handle evaluating constant index expression Add handling of float arrays to miri_to_const Update stderr of float_cmp test Update field names in is_float Add tests for float in array comparison Add lint when comparing floats in an array ```` Fixes #71114
2020-04-12submodules: update clippy from d342cee7 to af5940b7Matthias Krüger-26/+17
Changes: ```` Allow UUID style formatting for `inconsistent_digit_grouping` lint rustup https://github.com/rust-lang/rust/pull/70986 rustup https://github.com/rust-lang/rust/pull/69745 Rustup to https://github.com/rust-lang/rust/pull/70913 compare with the second largest instead of the smallest variant Revert "Downgrade new_ret_no_self to pedantic" Check for clone-on-copy in argument positions Check fn header along with decl when suggesting to implement trait Downgrade implicit_hasher to pedantic Move cognitive_complexity to nursery Run fmt and update test Use int assoc consts in MANUAL_SATURATING_ARITHMETIC Use int assoc consts in checked_conversions lint Use primitive type assoc consts in more tests Use integer assoc consts in more lint example code Don't import primitive type modules Use assoc const NAN for zero_div_zero lint Fix float cmp to use assoc fxx::EPSILON Fix NAN comparison lint to use assoc NAN Refine lint message. Lint on opt.as_ref().map(|x| &**x). Include OpAssign in suspicious_op_assign_impl result_map_or_into_option: fix syntax error in example result_map_or_into: fix dogfood_clippy error => {h,l}int CONTRIBUTING.md: fix broken triage link result_map_or_into_option: fix `cargo dev fmt --check` errors result_map_or_into_option: move arg checks into tuple assignment result_map_or_into_option: add `opt.map_or(None, |_| Some(y))` test result_map_or_into_option: destructure lint tuple or return early result_map_or_into_option: add good and bad examples result_map_or_into_option: explicitly note absence of known problems Downgrade new_ret_no_self to pedantic Downgrade unreadable_literal to pedantic Update CONTRIBUTING.md Rename rustc -> rustc_middle in doc links result_map_or_into_option: add lint to catch manually adpating Result -> Option Move matches test in matches module Run update_lints Make lint modules private Don't filter lints in code generation functions Build lint lists once and the reuse them to update files Get rid of Lint::is_internal method Clean up update_lints Downgrade inefficient_to_string to pedantic Downgrade trivially_copy_pass_by_ref to pedantic Downgrade let_unit_value to pedantic ```` Fixes #70993
2020-04-07Update Clippyflip1995-14/+22
2020-04-05submodules: update clippy from 326b2204 to 7907abeaMatthias Krüger-11/+18
Changes: ```` Rustup to rust-lang/rust#70634 Update clippy_lints/src/types.rs Update types.rs Update types.rs Improve docs for option_option useless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T> Allow let_underscore Update option_option ui test Test for ignoring let_underscore_must_use Downgrade option_option to pedantic ```` Fixes #70709
2020-04-01Update Clippyflip1995-7/+9
2020-03-30submodules: update clippy from 70b93aab to e170c849Matthias Krüger-12/+8
Changes: ```` rustup https://github.com/rust-lang/rust/pull/70536 Rustup to https://github.com/rust-lang/rust/pull/70449 readme: move "how to run single lint" instructions to "Allowing/denying lints" section. git attribute macros not allowed in submodules Deprecate REPLACE_CONSTS lint Bump itertools ```` Fixes #70554
2020-03-27submodules: update clippy from 1ff81c1b to 70b93aabMatthias Krüger-10/+10
Changes: ```` remove redundant import rustup https://github.com/rust-lang/rust/pull/68404 rustup https://github.com/rust-lang/rust/pull/69644 rustup https://github.com/rust-lang/rust/pull/70344 Move verbose_file_reads to restriction move redundant_pub_crate to nursery readme: explain how to run only a single lint on a codebase Remove dependency on `matches` crate Move useless_transmute to nursery nursery group -> style Update for PR feedback Auto merge of #5314 - ehuss:remove-git2, r=flip1995 Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them ```` Fixes #70456
2020-03-23submodules: update clippy from d8e6e4cf to 1ff81c1bMatthias Krüger-17/+10
Changes: ```` rustup https://github.com/rust-lang/rust/pull/69968/ Fix documentation generation for configurable lints Fix single binding in closure Improvement: Don't show function body in needless_lifetimes ````
2020-03-19Update Clippyflip1995-7/+18
2020-03-16submodules: update clippy from 8485d40a to 23549a8cMatthias Krüger-12/+8
Changes: ```` rustup https://github.com/rust-lang/rust/pull/69738 rustup https://github.com/rust-lang/rust/pull/68944 Make use of `or_patterns` feature rustup https://github.com/rust-lang/rust/pull/69589/ Rustup to rust-lang/rust#69076 Don't convert Path to lossy str Use `into_path` Use pattern matching instead of manually checking condition Fix typo Remove git2 dependency. Document that wildcard_imports doesn't warn about `use ...::prelude::*;` Change changelog formatting Update changelog_update doc to reflect the actual ordering of the changelog Update CHANGELOG.md ```` Fixes #70007
2020-03-12submodules: update clippy from 329923ed to 8485d40aMatthias Krüger-10/+10
Changes: ```` Rustup to rust-lang/rust#69674 Use visit_place Check for mutation Only fires on temporaries Extend `redundant_clone` to the case that cloned value is not consumed add CR feedback Improve documentation Use `edition:2018` flag more widely Update tests/ui/needless_doc_main.rs Move links to the end of each chapter on adding_lints Move links to the end of each chapter on CONTRIBUTING Clean-up adding_lints.md Clean-up CONTRIBUTING.md needless_doc_main: only check rust code Use `node_type_opt` over `node_type` Fix doc Fix ICE with trivial_bounds feature clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. update rust-lang.github.io to rustc-dev-guide.rust-lang.org Improve placeholder in map_unit_fn Fix match single binding when in a let stmt Improve error messages for {option,result}_map_unit_fn Mention the setup instructions in CONTRIBUTING redundant_pattern: take binding (ref, ref mut) into account in suggestion. check_pat: delay creation of the "normal" vec until we reach the branch where is is actually needed deps: bump itertools 0.8 -> 0.9 add lint on File::read_to_string and File::read_to_end transition rustc-guide to rustc-dev-guide Rename macro_use_import -> macro_use_imports warn on macro_use attr Fix deploy script for tag deploys ```` Fixes #69957
2020-03-04submodules: update clippy from 8b7f7e66 to 329923edMatthias Krüger-7/+11
Changes: ```` Apply suggestions from code review Simplify if_chain. Move NumericLiteral to its own module. Included binary and octal cases. Resolve false positives for hex int cast. Test for unnecessary_cast of hex int literal. run-rustfix Lint `if let Some` in question_mark lint Add restrictive pat use in full binded struct Update test case answers to match cargo dev fmt Ran cargo dev fmt Rustup to rust-lang/rust#69506 Recommended changes from flip1995 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. Fix one last test issue Refactor suggested by krishna-veerareddy Fixed compile error from merging Changed test output to reflect cargo fmt Run cargo dev fmt Finished checking for cases of absolute values add test for #5238 Some bugfixing Created floating point abs lint and test, but not yet run ````
2020-03-02Update cargo, clippyEric Huss-7/+7
2020-02-24Update Clippyflip1995-10/+8
2020-02-21Update Clippyflip1995-8/+10
2020-02-19submodules: update clippy from b91ae16e to 2855b214Matthias Krüger-9/+7
Changes: ```` Rustup to rust-lang/rust#69194 Rustup to rust-lang/rust#69181 Add `LOG2_10` and `LOG10_2` to `approx_const` lint Clean up imports Use `Vec::with_capacity()` as possible needless_doctest_main: False positive for async fn Remove use of `TyKind`. Use `if_chain`. Fix ICE. Add tests and improve checks. Add `Future` detection for `missing_errors_doc`. ```` Fixes #69269
2020-02-17Update ClippyYuki Okushi-8/+8
2020-02-12Update clippyLzu Tao-7/+9
2020-02-02Update ClippyYuki Okushi-7/+7
2020-01-29Update ClippyYuki Okushi-9/+7
2020-01-26Don't use ExpnKind::descr to get the name of a bang macro.Eduard-Mihai Burtescu-7/+9
2020-01-22Update ClippyYuki Okushi-12/+8
2020-01-19submodules: update clippy from a8d90f6a to fd0428f6Matthias Krüger-8/+12
Changes: ```` Treat more strange pattern Split up `if_same_then_else` ui test Apply review comments Run `update_lints` Reduce span range Rename `ok_if_let` to `if_let_some_result` Apply review comments Add suggestion in `if_let_some_result` rustup https://github.com/rust-lang/rust/pull/67712 Allow `unused_self` lint at the function level Downgrade range_plus_one to pedantic Rustup to rust-lang/rust#68204 Add lifetimes to `LateLintPass` Fix rustc lint import paths generated by `new_lint` Add lint for default lint description Update documentation for adding new lints Generate new lints easily Split up `booleans` ui test Fix the ordering on `nonminimal_bool` ````
2020-01-16Update Clippyflip1995-9/+7
2020-01-13Update ClippyYuki Okushi-8/+8
2020-01-10Update ClippyYuki Okushi-7/+9
2020-01-07Update ClippyYuki Okushi-7/+7
2020-01-05Update ClippyYuki Okushi-9/+7
2019-12-31Update ClippyYuki Okushi-7/+9
2019-12-29Update ClippyYuki Okushi-8/+7
2019-12-21submodules: update clippy from 69f99e74 to cfb33200Matthias Krüger-5/+11
Changes: ```` rustup "Merge `ast::Mutability` and `mir::Mutability`" rustup https://github.com/rust-lang/rust/pull/67130 rustup https://github.com/rust-lang/rust/pull/67455 There are no per-file copyright headers anymore Update lints for `iterator_step_by_zero` changes Fix 'redudant' spelling in redundant_clone docs Fix documentation example for unnecessary_filter_map. Fix `expect_fun_call` false negative on references Fix `iterator_step_by_zero` description in declaration Fix `iterator_step_by_zero` definition Correct `iterator_step_by_zero` documentation Update iterator_step_by_zero Prevent `cmp_nan` when inside constants Detect comparisons with NAN constants Fix clippy build failure ````
2019-12-14update clippy to the rustc-pr-67224 branchNiko Matsakis-13/+5
Actually to commit <69f99e74ac2266dff4b5adc7c59b35236f0abef1>.
2019-12-04Update Clippyflip1995-10/+9
2019-12-02submodules: update clippy from 7b8e8293 to 7a943a9dMatthias Krüger-11/+9
Changes: ```` Normalize custom ICE test Rustup to rust-lang/rust#64736 Use assert_crate_local for a more explicit error Rustup to https://github.com/rust-lang/rust/pull/66789 account for external macro in MISSING_INLINE_IN_PUBLIC_ITEMS lint build(tests/fmt): use shared target dir chore: fix and split some ui tests on 32bit system build: set up build job for i686 targets remove needless my_lint ui test git quiet deploy: cd to out/ before adding files to git Less needless_doctest_main false positives fmt Feed the dog Use rustc_env instead of exec_env for test Make triggering this lint less likely :paperclip: Use exec_env to set backtrace level and normalize output Update custom ICE function with latest rustc Use Clippy version in ICE message Add custom ICE message that points to Clippy repo Fix master deployment Run update_lints Add projections check to EUV for escape analysis Use infer_ctxt Move use_self to nursery Use `println!` on success instead of `eprintln!` Revert "Disable chalk integration test. Output too large" Remove the old integration-tests.sh script Use rust implementation for integration tests in CI Rust implementation of integration test Don't error on clippy.toml of dependencies Fix categorizations Fix arguments on ExprUseVisitor::new euv moved from middle to typeck cmt_ -> Place build: check if RTIM is not installed make use of Result::map_or trigger string_lit_as_bytes when literal has escapes Remove negative float literal checks. Enable deny-warnings feature everywhere in CI Remove unused debugging feature implemented `as_conversions` lint fixing a typo [comparison_chain] #4827 Check `core::cmp::Ord` is implemented add a good example for the approx_const lint Add suggested good cases in docs for lifetimes lint ````
2019-11-27Update clippyManish Goregaokar-14/+11
2019-11-23Update Clippyflip1995-7/+16
2019-11-14Update ClippyYuki Okushi-7/+7
2019-11-11Update clippyManish Goregaokar-7/+7
2019-11-11Update clippyManish Goregaokar-11/+7
2019-10-28submodules: update clippy from 66df92ae to c8e3cfbdMatthias Krüger-7/+11
Changes: ```` travis: temporarily disable rustfmt ci check until #4742 is resolved rustup https://github.com/rust-lang/rust/pull/65792/ Fix ICE #4579 Add regression test for ICE #4579 Run update_lints for Unicode lint Re-add false positive check Add raw string regression test for useless_format lint Re-factor useless_format lint Update Unicode lint tests [Backported] Rustup to https://github.com/rust-lang/rust/pull/59545 ```` Fixes ##65888
2019-10-26Update Clippyflip1995-13/+7
2019-10-24Update clippyManish Goregaokar-21/+16
2019-10-22Update Clippyflip1995-15/+21
2019-10-19Update clippyManish Goregaokar-7/+12