Commit graph

54 commits

Author SHA1 Message Date
Alex Macleod
9c6b17e24d Remove #![allow(unused)] and --crate-name from new_lint tests 2023-07-18 18:45:47 +00:00
y21
498db80d5c don't hide lifetimes for LateContext 2023-07-16 21:37:53 +02:00
Oli Scherer
514b6d04bb Port clippy away from compiletest to ui_test 2023-06-26 14:13:07 +00:00
Kisaragi Marine
aff9c01ab9
address or allow clippy::missing_panics_doc in clippy-dev 2023-06-14 22:27:26 +09:00
Alex Macleod
46808be16f Direct towards late passes in cargo dev new_lint 2023-06-08 15:56:42 +00:00
Yuri Astrakhan
783879e6fe Partial no-op refactoring of #9948
This contains preparatory work for #9948 to keep that change to the
minimum, and make it easier to review it.
2023-03-28 21:08:06 -04:00
Jirka Vebr
0b1ae20365
Fix dogfood tests by adding type annotations 2023-02-16 13:29:38 +01:00
Alex Macleod
637139d2ff Add clippy_utils::msrv::Msrv to keep track of the current MSRV 2022-11-21 18:16:40 +00:00
Philipp Krones
bbcde66685
Merge remote-tracking branch 'upstream/master' into rustup 2022-09-28 14:27:32 +02:00
Yuri Astrakhan
cc6b375cd3 fallout2: rework clippy_dev & _lints fmt inlining
* Inline format args where possible
* simplify a few complex macros into format str
* use formatdoc!() instead format!(indoc!(...))
2022-09-23 23:08:12 -04:00
David Koloski
4d015293d1 Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy 2022-09-21 13:13:27 -04:00
Alex Macleod
6d8959ea83 Add #[allow(unused)] to test in cargo dev new_lint 2022-09-16 21:04:38 +00:00
Jason Newcomb
abd3e7eabb Allow lint passes to be bound by TyCtxt 2022-09-06 14:23:03 -04:00
Jason Newcomb
fb41bfa774 Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
Guilherme-Vasconcelos
1bf8841479 Update all tests to comply with clippy::manual_empty_string_creations 2022-08-14 12:53:15 -03:00
Philipp Krones
dc29cfb8d5 Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup 2022-08-11 19:42:16 +02:00
Philipp Krones
879855bbaf
Merge remote-tracking branch 'upstream/master' into rustup 2022-08-11 19:26:04 +02:00
Philipp Krones
67c405cc1d Merge commit '3c7e7dbc1583a0b06df5bd7623dd354a4debd23d' into clippyup 2022-07-28 19:08:22 +02:00
Serial
f31937043d Implicitly set --type=cargo when using --category=cargo 2022-07-26 19:32:34 -04:00
Serial
c8ee8c30f0 Give the user more information during creation 2022-07-26 19:18:10 -04:00
Serial
51cd5a8667 Add --type flag to dev new_lint 2022-07-25 22:35:28 -04:00
Philipp Krones
09f5df5087 Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup 2022-06-30 10:50:09 +02:00
Serial
2bd1581bbf Add dev deprecate 2022-06-21 13:43:47 -04:00
flip1995
f8f9d01c2a Merge commit 'd7b5cbf065b88830ca519adcb73fad4c0d24b1c7' into clippyup 2022-06-16 17:39:06 +02:00
Jason Newcomb
cccc750046 Fix clap deprecation warnings 2022-06-13 21:57:17 -04:00
xFrednet
4587b6628d Merge 'rust-clippy/master' into clippyup 2022-05-21 13:24:00 +02: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
flip1995
7cd86aa1be Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyup 2022-05-05 15:12:52 +01:00
Peter Jaszkowiak
67badbeef6 New lint format_add_strings 2022-04-13 22:48:36 -06:00
flip1995
71131351de Merge commit '984330a6ee3c4d15626685d6dc8b7b759ff630bd' into clippyup 2022-04-08 10:06:10 +01:00
Jason Newcomb
7025283f3e Remove cargo_metadata dependency from clippy_dev 2022-04-01 23:18:47 -04:00
flip1995
8fea1d94f3 Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup 2021-12-06 12:33:31 +01:00
xFrednet
94bc0a1c78
Address review feedback 2021-11-10 20:14:02 +01:00
xFrednet
23ed79260b
Document new clippy::version attribute and make it mandatory 2021-11-10 19:48:30 +01:00
flip1995
e674d0a599 Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup 2021-11-04 12:52:36 +00:00
Alex Macleod
bd778e216d Register the generated lints from cargo dev new_lint 2021-10-26 19:05:29 +01:00
flip1995
7631fc5d82 Merge commit '91496c2ac6abf6454c413bb23e8becf6b6dc20ea' into clippyup 2021-10-21 13:11:36 +02:00
Michael Wright
7d9b21b90b Use indoc for formatting 2021-10-09 05:58:05 +02:00
Michael Wright
b8782257ae Fix clippy::too-many-arguments violation 2021-10-09 05:58:05 +02:00
Michael Wright
da76c06209 Add --msrv option to new_lint command 2021-10-09 05:58:05 +02:00
flip1995
2b20f49841 Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup 2021-07-29 12:16:06 +02:00
xFrednet
12c61612f7
Update lint documentation to use markdown headlines 2021-07-28 14:31:59 +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
282c59820b Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +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
flip1995
8b9d70d349
Define modules in lib.rs instead of main.rs 2020-03-31 17:24:09 +02: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
Krishna Sai Veera Reddy
6b4cae18dd Remove unnecessary imports from new_lint tool 2020-02-10 19:24:01 -08:00