Eduardo Broto
6dd65b8e6a
Fix cargo dev new_lint for late lint passes
2020-08-23 10:14:09 +02:00
Dmitry Murzin
6af969379e
Prevent compile parts of rustc when using cargo dev ra-setup
2020-08-09 22:21:09 +05:00
Eduardo Broto
c325c120c2
Fix cargo ui tests when running inside rust repo
2020-06-05 22:30:14 +02:00
Matthias Krüger
7b49090380
clippy_dev: add ra_setup
...
This takes an absolute path to a rustc repo and adds path-dependencies
that point towards the respective rustc subcrates into the Cargo.tomls of
the clippy and clippy_lints crate.
This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo.
Usage: cargo dev ra-setup /absolute/path/to/rust/
cc https://github.com/rust-analyzer/rust-analyzer/issues/3517
cc https://github.com/rust-lang/rust-clippy/issues/5514
2020-05-28 04:14:04 +02:00
Eduardo Broto
cff5cff2f3
Make the name of the crate available in cargo UI tests
2020-05-25 20:00:08 +02:00
Eduardo Broto
1a04686fc0
Avoid triggering match_wildcard_for_single_variants
2020-05-21 14:47:13 +02:00
Eduardo Broto
7ff71199df
Address comments from PR review
2020-05-21 14:46:04 +02:00
Eduardo Broto
1eb6adf475
Adapt cargo dev new_lint
to create tests for cargo lints
2020-05-21 14:11:11 +02:00
Matthias Krüger
d021d3ef88
clippy_dev: make it fatal when the regex for updating lint count does not match
...
Fixes #5510
2020-04-23 16:11:11 +02:00
flip1995
d89bb50f72
Make lint modules private
2020-04-03 21:19:33 +02:00
flip1995
a186d9fafd
Don't filter lints in code generation functions
2020-04-03 21:19:32 +02:00
flip1995
98c30fea8c
Build lint lists once and the reuse them to update files
2020-04-03 21:19:32 +02:00
flip1995
da679825e0
Get rid of Lint::is_internal method
2020-04-03 21:19:32 +02:00
flip1995
ffb2e41234
Clean up update_lints
2020-04-03 21:18:36 +02:00
flip1995
3155eedb68
Don't use an exact lint counter anymore
2020-03-31 17:24:09 +02:00
flip1995
5de019074b
Move update_lints logic to its own module
2020-03-31 17:24:09 +02:00
flip1995
deb1979b8e
Make limit_stderr_length a subcommand
2020-03-31 17:24:09 +02:00
flip1995
8b9d70d349
Define modules in lib.rs instead of main.rs
2020-03-31 17:24:09 +02:00
Lzu Tao
53880a5bd6
Bump itertools
2020-03-29 12:50:11 +07:00
bors
e004b9431d
Auto merge of #5329 - matthiaskrgr:int_arith_on_ref_5328, r=flip1995
...
integer_arithmetic: detect integer arithmetic on references.
changelog: integer_arithmetic fix false negatives with references on integers
Fixes #5328
2020-03-18 14:56:05 +00:00
flip1995
f041dcdb4e
Fix limit-stderr-files test
2020-03-18 15:27:25 +01:00
Matthias Krüger
7545925ffe
new_lint.rs: encourage authors to write more detailed code samples in lint descriptions (linted as well as fixed code)
...
changelog: none
2020-03-18 01:43:39 +01:00
Yuki Okushi
4253aa7137
Rustup to rust-lang/rust#69592
2020-03-01 12:23:33 +09:00
flip1995
8472ecda0f
Fix fallout
2020-02-21 11:14:18 +01:00
flip1995
50a2f971fc
Adapt gen_lint_group_list test to also generate internal lints
2020-02-14 14:42:24 +01:00
flip1995
07026983f5
Rename lint_count -> usable_lint_count
2020-02-14 14:37:56 +01:00
flip1995
4a9bfe4184
Let update_lints also generate the internal lints
2020-02-14 14:37:56 +01:00
flip1995
3da2c9183a
Save Lint::module as full path of module
2020-02-14 14:37:56 +01:00
flip1995
560559bafe
Make Lint::by_lint_group take impl Iterator as argument
2020-02-14 14:37:55 +01:00
Krishna Sai Veera Reddy
6b4cae18dd
Remove unnecessary imports from new_lint
tool
2020-02-10 19:24:01 -08:00
Lzu Tao
cf58537bd6
dev: Move DOCS_LINK out of lazy_static and reuse it
2020-02-07 08:33:05 +07:00
Lzu Tao
344603afce
dev: Make UpdateMode a copy type
2020-02-07 08:33:05 +07:00
Lzu Tao
729f943c53
dev: Prefer fs::read*
and improvement to replace text region
2020-02-07 08:33:05 +07:00
Lzu Tao
8794e41728
dev: Use bytecount for faster line count
2020-02-06 21:39:15 +07:00
Yuki Okushi
7a36a8d98a
Decrease line length limit for stderrs
2020-02-03 15:11:02 +09:00
bors
ca2abaf366
Auto merge of #5109 - phansch:ciao_util_dev, r=flip1995
...
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-31 07:18:06 +00:00
Phil Hansch
8f457fa4c9
Mark clippy_project_root as must_use
...
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2020-01-31 07:32:53 +01:00
Philipp Hansch
3f2532b904
Replace one more copy-pasted clippy_project_root fn
2020-01-31 07:30:44 +01:00
Philipp Hansch
3036a2c30e
Move project_root function to clippy_dev/src/lib.rs
...
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-30 21:34:25 +01:00
Philipp Hansch
4d1a11d354
Deprecate util/dev in favor of cargo alias
...
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-30 21:34:31 +01:00
Yuki Okushi
411317bd2c
Decrease line length limit for stderr files
2020-01-30 12:08:38 +09:00
Yuki Okushi
c9d5cb9645
Decrease line length limit for stderr files
2020-01-21 06:43:01 +09:00
Krishna Sai Veera Reddy
9ebac161e4
Add lifetimes to LateLintPass
2020-01-16 10:05:29 -08:00
Krishna Sai Veera Reddy
2d352f42cc
Fix rustc lint import paths generated by new_lint
2020-01-16 09:44:45 -08:00
Brad Sherman
ea82cbe790
Generate new lints easily
...
- Add option in clippy_dev to automatically generate boilerplate
code for adding new lints
2020-01-15 21:20:50 -06:00
Lzu Tao
f5b896451a
do minor cleanups
...
* ToString and AsRef are in prelude, no need to import them
2019-12-24 03:06:52 +07:00
Lzu Tao
185e608ae2
a few small cleanups
2019-12-23 05:28:23 +07:00
flip1995
d51a80c57e
Enable deny-warnings feature everywhere in CI
2019-11-25 17:23:48 +01:00
flip1995
b2616641d9
Fix dogfood findings
2019-10-24 14:39:19 +02:00
flip1995
ef02e3a755
Run ./util/dev fmt
2019-10-24 11:55:22 +02:00