Philipp Krones
f067783461
Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup
2022-06-04 13:34:07 +02:00
Marcel Hellwig
9b55ea78c8
update dependencies
2022-05-23 09:28:49 +02:00
xFrednet
4587b6628d
Merge 'rust-clippy/master' into clippyup
2022-05-21 13:24:00 +02:00
Jason Newcomb
f7378daf71
Add renamed lints to the changelog link list
2022-05-15 17:10:48 -04:00
ydah
4e5f69cc86
Tweak some words improved representation
...
This PR has implemented improved representation.
- Use "lib" instead of "lifb"
- Use "triggered" instead of "triggere"
- Use "blacklisted_name" instead of "blackisted_name"
- Use "stabilization" instead of "stabilisation"
- Use "behavior" instead of "behaviour"
- Use "target" instead of "tartet"
- Use "checked_add" instead of "chcked_add"
- Use "anti-pattern" instead of "antipattern"
- Use "suggestion" instead of "suggesttion"
- Use "example" instead of "exampel"
- Use "Cheat Sheet" instead of "Cheatsheet"
2022-05-13 14:20:25 +09:00
nsunderland1
fe84ff3360
New lint: [derive_partial_eq_without_eq
]
2022-05-09 22:13:39 -07:00
Alex Macleod
905a951718
Pass through extra args in cargo dev lint
2022-05-06 15:36:46 +01:00
flip1995
7cd86aa1be
Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyup
2022-05-05 15:12:52 +01:00
flip1995
3b0c78d283
Merge remote-tracking branch 'upstream/master' into rustup
2022-05-05 13:32:06 +01:00
bors
32fe4762bf
Auto merge of #8625 - Jarcho:rename_lint, r=xFrednet
...
Add `cargo dev rename_lint`
fixes #7799
changelog: None
2022-04-30 17:22:34 +00:00
Jason Newcomb
b3de32ba3c
Add rename_lint
command
2022-04-24 09:15:26 -04:00
whodi
2be7ad5b39
initialization misspell
2022-04-15 14:19:00 -07:00
whodi
29ef80c78a
adding spell checking
2022-04-15 14:18:09 -07:00
Peter Jaszkowiak
67badbeef6
New lint format_add_strings
2022-04-13 22:48:36 -06:00
Yoav Lavi
ffde78b456
Allow passing --remove to cargo dev setup <SUBCOMMAND>
...
add missing args
unque name not needed
more descriptive help
formatting fixes
missing quote
2022-04-09 16:50:10 +02:00
flip1995
da26623d54
Update Cargo.lock
2022-04-08 10:41:55 +01:00
flip1995
71131351de
Merge commit '984330a6ee3c4d15626685d6dc8b7b759ff630bd' into clippyup
2022-04-08 10:06:10 +01:00
flip1995
6ab4508350
Allow raw lint descriptions
...
update_lints now understands raw strings in declare_clippy_lint
descriptions.
Co-authored-by: Alex Macleod <alex@macleod.io>
2022-04-07 18:05:46 +01:00
bors
01ea6241ae
Auto merge of #8607 - Alexendoo:cargo-dev-lint-dir, r=flip1995,giraffate
...
Allow running `cargo dev lint` on a package directory
Allows you run the local clippy in a specified directory, e.g. allowing
```sh
# Lint a ui-cargo test
cargo dev lint tests/ui-cargo/wildcard_dependencies/fail
# Lint some other project
cargo dev lint ~/my-project
```
The `target` directory is set to a tempdir which isn't ideal for medium/large projects as it would be compiled from scratch. This is to avoid cached clippy messages where you `cargo dev lint dir`, change something in clippy, and run `cargo dev lint dir` again
changelog: Dev: `cargo dev lint` can now be run on a package directory
2022-04-05 09:33:38 +00:00
Jason Newcomb
d5ef542d37
Generate renamed lint test
2022-04-03 22:52:42 -04:00
Jason Newcomb
4227411513
Generate deprecated lints test
2022-04-03 08:54:37 -04:00
Jason Newcomb
7025283f3e
Remove cargo_metadata dependency from clippy_dev
2022-04-01 23:18:47 -04:00
Jason Newcomb
b3f8415032
Remove regex dependency from clippy_dev
2022-04-01 23:18:47 -04:00
Alex Macleod
9a02386fd8
Allow running cargo dev lint
on a package directory
2022-03-29 19:03:36 +01:00
pierwill
c8d6a55f6a
Update itertools
...
Update to 0.10.1
2022-03-04 11:54:28 -06:00
flip1995
611d039814
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
2022-02-10 18:40:06 +01:00
flip1995
bf66aeda0a
Merge commit 'a98e7ab8b94485be6bd03e0c6b8682ecab5b52e6' into clippyup
2022-01-27 15:12:45 +01:00
flip1995
fb0142ae41
Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyup
2022-01-13 13:18:19 +01:00
flip1995
8fea1d94f3
Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup
2021-12-06 12:33:31 +01:00
flip1995
e674d0a599
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
2021-11-04 12:52:36 +00:00
flip1995
7631fc5d82
Merge commit '91496c2ac6abf6454c413bb23e8becf6b6dc20ea' into clippyup
2021-10-21 13:11:36 +02:00
flip1995
5cf4984872
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
2021-10-07 11:21:30 +02:00
flip1995
23d5457e6d
Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyup
2021-09-28 18:03:12 +01:00
Samuel E. Moelius III
43ed2065cc
Update dependencies
2021-09-09 07:47:16 -04:00
flip1995
091ed44b50
Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup
2021-09-08 16:31:47 +02:00
Jade
6c2199ea9f
rfc3052: Remove authors field from Cargo manifests
...
Since RFC 3052 soft deprecated the authors field anyway, hiding it from
crates.io, docs.rs, and making Cargo not add it by default, and it is
not generally up to date/useful information, we should remove it from
crates in this repo.
2021-07-29 14:56:05 -07:00
flip1995
2b20f49841
Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup
2021-07-29 12:16:06 +02:00
flip1995
ebe52869a3
Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup
2021-07-01 18:17:38 +02:00
flip1995
97705b7ea6
Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup
2021-05-20 13:07:57 +02:00
Joshua Nelson
af0dde24b9
Implement x.py test src/tools/clippy --bless
...
- Add clippy_dev to the rust workspace
Before, it would give an error that it wasn't either included or
excluded from the workspace:
```
error: current package believes it's in a workspace when it's not:
current: /home/joshua/rustc/src/tools/clippy/clippy_dev/Cargo.toml
workspace: /home/joshua/rustc/Cargo.toml
this may be fixable by adding `src/tools/clippy/clippy_dev` to the `workspace.members` array of the manifest located at: /home/joshua/rustc/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
```
- Change clippy's copy of compiletest not to special-case
rust-lang/rust. Using OUT_DIR confused `clippy_dev` and it couldn't find
the test outputs. This is one of the reasons why `cargo dev bless` used
to silently do nothing (the others were that `CARGO_TARGET_DIR` and
`PROFILE` weren't set appropriately).
- Run clippy_dev on test failure
I tested this by removing a couple lines from a stderr file, and they
were correctly replaced.
- Fix clippy_dev warnings
2021-04-27 16:57:29 +00:00
flip1995
f6d1f368db
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
2021-04-08 17:50:13 +02:00
flip1995
9f6b5de7de
Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup
2021-03-25 19:29:11 +01:00
flip1995
f2f2a005b4
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
2021-03-12 15:30:50 +01:00
flip1995
f64149dd04
Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyup
2021-02-25 11:25:22 +01:00
flip1995
8b9f4a0d34
Merge commit '70c0f90453701e7d6d9b99aaa1fc6a765937b736' into clippyup
2021-02-11 15:04:38 +01:00
Manish Goregaokar
c8cb90abbd
Merge commit '3e4179766bcecd712824da04356621b8df012ea4' into sync-from-clippy
2021-02-02 20:43:30 -08:00
flip1995
ac912be984
Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyup
2021-01-30 18:06:34 +01:00
flip1995
488153ff2f
Merge commit '953f024793dab92745fee9cd2c4dee6a60451771' into clippyup
2021-01-15 10:56:44 +01:00
flip1995
ba4bf4f9c5
Merge commit '1fcc74cc9e03bc91eaa80ecf92976b0b14b3aeb6' into clippyup
2021-01-02 16:29:43 +01:00
flip1995
f03edfd7a1
Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyup
2020-12-20 17:19:49 +01:00
flip1995
8eca423ea1
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyup
2020-12-06 15:01:03 +01:00
flip1995
03f04314dd
clippy: Remove now obsolete lintlist module
...
Also stop updating the lintlist module in clippy_dev update_lints
2020-11-24 10:37:31 +01:00
flip1995
34244190d4
Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyup
2020-11-05 14:29:48 +01:00
Eduardo Broto
cdb555f4fc
Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup
2020-10-23 22:16:59 +02:00
flip1995
fbf2430f02
Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup
2020-10-09 12:45:29 +02:00
flip1995
d1f9cad102
Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup
2020-09-24 14:49:22 +02:00
flip1995
282c59820b
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
2020-08-28 18:43:25 +02:00
flip1995
027780ca2c
Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup
2020-08-11 17:50:45 +02:00
Lzu Tao
8db24840f7
Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
2020-06-09 14:36:01 +00:00
flip1995
a0e9f9bd0d
Merge commit '7ea7cd165ad6705603852771bf82cc2fd6560db5' into clippyup2
2020-05-28 15:45:24 +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