about summary refs log tree commit diff
path: root/clippy_dev/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-01-31Mark clippy_project_root as `must_use`Phil Hansch-0/+1
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2020-01-30Move project_root function to clippy_dev/src/lib.rsPhilipp Hansch-5/+18
This allows us to use the method in both `fmt.rs` and `lib.rs` in multiple places. The downside is that we panic inside the method now, instead of using the error handling in `fmt.rs`. We may want to centralize the error handling for clippy_dev at some point, though.
2020-01-30Deprecate util/dev in favor of cargo aliasPhilipp Hansch-4/+13
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.
2019-12-24do minor cleanupsLzu Tao-1/+1
* ToString and AsRef are in prelude, no need to import them
2019-11-25Enable deny-warnings feature everywhere in CIflip1995-0/+2
2019-10-24Fix dogfood findingsflip1995-2/+8
2019-10-24Update clippy_devMark Rousskov-3/+17
2019-10-14new lints around `#[must_use]` fnsAndre Bogus-0/+7
`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-02account for doc visibilityAndre Bogus-1/+1
2019-08-19Add option_and_then_some lintLzu Tao-3/+3
2019-08-12Update lint deprecation for tool lintsPhilipp Hansch-3/+3
Our lint deprecation previously didn't work for tool lints, because `register_removed` was registering lints to be removed _without_ the `clippy` prefix.
2019-04-15Remove clippy::default_hash_types internal lintflip1995-2/+0
2019-03-10Various cosmetic improvements.Alexander Regueiro-2/+2
2019-03-05move lint documentation into macro invocationsAndy Russell-3/+5
2019-02-10removing redundant closures in the whole projectGrzegorz-2/+2
2019-01-25dependencies: update itertools from 0.7 to 0.8Matthias Krüger-10/+15
2019-01-08Remove all copyright license headersPhilipp Hansch-9/+0
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2018-12-25fix a couple of ftrivial typos (NFC).Matthias Krüger-2/+2
2018-11-27Run rustfmt on clippy_devflip1995-80/+128
2018-11-22rust-lang-nursery/rust-clippy => rust-lang/rust-clippyMatthias Krüger-1/+1
2018-11-05Fix false positive in check mode caused by `gen_deprecated`Philipp Hansch-39/+50
`gen_deprecated` should never have created the string with linebreaks. Using a single string broke the check because the changed lines were different.
2018-11-05RIIR update lints: Add check mode (update_lints.py rewrite complete)Philipp Hansch-14/+27
This finishes up the rewrite of `update_lints.py` in Rust. More specifically, this * adds the `--check` flag and handling to clippy_dev * tracks file changes over the different calls to `replace_region_in_file` * only writes changes to files if the `--check` flag is *not* used * runs `./util/dev update_lints --check` on CI instead of the old script * replaces usage of the `update_lints.py` script with an error `./util/dev update_lints` behaves 99% the same as the python script. The only difference that I'm aware of is an ordering change to `clippy_lints/src/lib.rs` because underscores seem to be sorted differently in Rust and in Python. :checkered_flag:
2018-11-03Merge #3399bors[bot]-2/+64
3399: RIIR update lints: Generate modules section and lint group sections r=flip1995 a=phansch This adds the last missing parts of the generating code. cc #2882 Co-authored-by: Philipp Hansch <dev@phansch.net>
2018-11-03RIIR update lints: Generate lint group registrationsPhilipp Hansch-0/+28
2018-11-03Test clippy_dev on CI and fix testPhilipp Hansch-3/+3
2018-11-03RIIR update lints: Generate modules sectionPhilipp Hansch-2/+36
2018-11-02clippy: fix pedantic warnings and run clippy::pedantic lints on the codebase.Matthias Krüger-1/+0
Turn on pedantic lints in dogfood and base tests. needless_bool: fix clippy::items-after-statements redundant_pattern_matching: fix clippy::similar-names mods.rs: fix clippy::explicit-iter-loop returns.rs: allow clippy::cast-possible-wrap Fixes #3172
2018-10-31Fix dogfood and pedantic lintsPhilipp Hansch-18/+20
2018-10-31RIIR update lints: Generate deprecated lintsPhilipp Hansch-0/+33
The update script now also generates the 'register_removed' section in `clippy_lints/src/lib.rs`. Also, instead of using `let mut store ...`, I added a new identifier line so that the replacement will continue to work in case `let mut store ...` ever changes.
2018-10-17RIIR update_lints: Update changelog linksPhilipp Hansch-1/+31
This now also updates the link list at the bottom of the changelog.
2018-10-16Fix dogfoodPhilipp Hansch-1/+2
`expect_fun_call` causes a false-positive, so I disabled it for now.
2018-10-16RIIR update_lints: Replace lint count in README.mdPhilipp Hansch-0/+119
This allows the usage of `util/dev update_lints` which will write the new lint_count to the `README.md`.
2018-10-16Rename `active_lints` to `usable_lints`Philipp Hansch-6/+8
Because now `usable_lints` will also exclude internal lints.
2018-10-15Add comment on WalkDir vs. fs::read_dirPhilipp Hansch-0/+2
2018-10-15Some more documentation for clippy_devPhilipp Hansch-0/+2
2018-10-15Use `WalkDir` to also gather from subdirectoriesPhilipp Hansch-4/+5
`fs::read_dir` does not recurse into subdirectories.
2018-10-11Stabilize tool lintsOliver Scherer-1/+1
2018-10-11Use `impl Iterator` in arg position in clippy_devPhilipp Hansch-3/+3
Small refactoring pulled out of work on #3266. This should make the methods a bit more flexible.
2018-10-06Add license header to Rust filesManish Goregaokar-0/+10
2018-09-26fix all clippy::use_self pedantic warnings found in the codebase.Matthias Krüger-4/+4
cc #3172
2018-09-23clippy_dev: port to edition 2018Matthias Krüger-5/+2
2018-09-12Change Hash{Map, Set} to FxHash{Map, Set}flip1995-0/+2
2018-09-06Pass by ref instead of valuePhilipp Hansch-2/+2
2018-09-06More refactoringPhilipp Hansch-18/+12
2018-09-05Return impl Iterator instead of Vec<Lint>Philipp Hansch-13/+13
This makes the API of `lib.rs` a bit more flexible.
2018-09-03Refactor to use into_group_map from ItertoolsPhilipp Hansch-9/+19
2018-09-03s/direntry/dir_entryPhilipp Hansch-5/+5
2018-09-03Use insignificant whitespace mode for nice regexPhilipp Hansch-2/+11
2018-09-03update_lints rewrite: Add structure and --print-onlyPhilipp Hansch-0/+144