Commit graph

182 commits

Author SHA1 Message Date
Alex Macleod
04dce4aed4 Support cargo dev bless for tests with revisions 2022-02-06 13:00:17 +00:00
Jason Newcomb
7ed29c0051 Don't bless outdated files on windows 2022-01-21 23:13:09 -05:00
Cameron Steffen
3afbae33ab Remove __CLIPPY_INTERNAL_TESTS env var 2022-01-17 12:37:05 -06:00
Cameron Steffen
d356fb9fa2 Use rustup which rustfmt 2022-01-10 17:04:38 -06:00
Cameron Steffen
7cf4f44e56 Fix output capturing 2022-01-10 15:11:25 -06:00
Cameron Steffen
e2ce4f9462 Combine internal features in clippy_lints 2022-01-09 18:35:12 -06:00
Alex Macleod
507030f7c4 Run rustfmt on batches of multiple files 2021-11-12 21:22:09 +00:00
Jason Newcomb
24d561f008 Use rustfmt version from rust-toolchain 2021-11-11 21:14:40 -05:00
xFrednet
94bc0a1c78
Address review feedback 2021-11-10 20:14:02 +01:00
xFrednet
63cb41098b
Manually add clippy::version attribute to deprecated lints 2021-11-10 19:48:30 +01:00
xFrednet
23ed79260b
Document new clippy::version attribute and make it mandatory 2021-11-10 19:48:30 +01:00
xFrednet
8565fc468e
Add clippy version to Clippy's lint list 2021-11-10 19:48:30 +01:00
Alex Macleod
b5bae09184 Add cargo dev lint to manually run clippy on a file
I found the manual run command really useful, this makes it a bit easier
to type
2021-11-06 17:20:15 +00:00
Alex Macleod
bd778e216d Register the generated lints from cargo dev new_lint 2021-10-26 19:05:29 +01:00
Samuel E. Moelius III
75e9f8cbd6 Remove redundant to_strings 2021-10-15 12:44:49 -04: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
Michael Wright
8f075ec961 Revert update_lints module list generating code
This commit reverts the module list generation code to what it was
before the change to `include!` it and generates better output.
2021-10-07 06:42:21 +02:00
Manish Goregaokar
0e481b9452 Return to generating mod declarations in lib.rs 2021-10-06 00:12:38 -07:00
mikerite
debb1f0274
Fix comment in update_lints
Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
2021-09-30 05:11:39 +02:00
Michael Wright
20abbd93f9 Add test module for update_lints 2021-09-29 05:46:43 +02:00
Michael Wright
3f804ca6d3 Move update_lints specific code out of lib 2021-09-29 05:46:43 +02:00
Michael Wright
e6747df5cd Fix lint register code format
Also change the generation functions to return `String` instead of
`Vec<String>`. This makes sense now as the updates aren't line oriented
anymore.
2021-09-29 05:46:39 +02:00
Michael Wright
50ea370619 Move code generated by update_lints to includes 2021-09-29 05:43:25 +02:00
Cameron Steffen
1074bad06d Rename test_build_base to test 2021-09-08 14:07:03 -05:00
Cameron Steffen
ecaf7acd4f Use relative path for test builds 2021-09-08 14:07:03 -05:00
Cameron Steffen
e3b171dcf0 Use relative exe paths 2021-09-08 14:07:03 -05:00
Cameron Steffen
68b4a43e23 Remove stderr limit 2021-08-23 11:02:03 -05:00
Philipp Krones
464c85c8c1
Rollup merge of #7420 - xFrednet:7172-update-lint-documentation, r=flip1995
Update lint documentation to use markdown headlines

This PR updates all lint documentation to use markdown headlines. It additionally removed the *Known problems* section for lints without any problems. I've double-checked all automatic replacements, but a second pair of eyes is definitely appreciated!

I wasn't sure when you wanted to switch to the new metadata collection tomorrow, I therefore prepared this PR today. And that's it this is a standalone PR to keep the other related PRs reviewable.

changelog:  none

r? `@flip1995`

cc: #7172

Note: This should be merged with the other metadata collection related PRs.
2021-07-28 15:06:27 +02:00
flip1995
c951a3c68d
Run cargo collect-metadata in cargo dev serve 2021-07-28 15:05:11 +02:00
xFrednet
12c61612f7
Update lint documentation to use markdown headlines 2021-07-28 14:31:59 +02:00
bors
f4bc9cf390 Auto merge of #7409 - xFrednet:5394-vs-code-tasks, r=giraffate,flip1995
Added `cargo dev setup vscode-tasks` for simplicity

This PR adds a setup command to `clippy dev` that installs tasks into the Clippy vscode workspace. These might be useful as they be used via shortcuts and are accessible over the GUI. The available tasks are:
* `cargo check` (standard Linux shortcut `[ctrl] + [shift] + b`)
* `cargo dev fmt`
* `cargo uitest` (with a comment how to add the `TESTNAME` environment value)
* `cargo test`
* `cargo dev bless`

---

changelog: none

only internal changes again. cc #5394

r? `@flip1995` This should be pretty much the same as the other `cargo dev setup` commands. Would you mind reviewing this? 🙃
2021-06-29 08:53:59 +00:00
xFrednet
e40019134b Updated clippy_dev ui message and vscode task name
Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
2021-06-28 20:40:09 +02:00
xFrednet
2098b27a20 Added cargo dev setup vscode-tasks for simplicity 2021-06-27 22:36:41 +02:00
Cameron Steffen
7e21db5b5c Add suspicious group 2021-06-25 08:53:29 -05:00
xFrednet
8e969cdcef
Updated several clippy_dev messages and types (PR suggestions)
Co-authored-by: Philipp Krones <hello@philkrones.com>
2021-06-25 11:17:00 +02:00
xFrednet
f0fa363653
Added cargo dev remove intellij 2021-06-25 11:17:00 +02:00
xFrednet
8fdf2897da
Updated cargo dev setup intellij for cleaner user messages 2021-06-25 11:17:00 +02:00
xFrednet
b48f041bef
Added the cargo dev remove command for convenience 2021-06-25 11:17:00 +02:00
xFrednet
3d0984975e
Print cargo dev help on missing arg and updated setup documentation 2021-06-25 11:17:00 +02:00
xFrednet
0a5f28c4b0
Added cargo dev setup git-hook 2021-06-25 11:16:59 +02:00
xFrednet
0941d9f14d
Moved dev ide_setup to setup/intellij.rs 2021-06-25 11:16:55 +02:00
Cameron Steffen
206bb08d10 Remove rustfmt workaround 2021-06-21 10:50:48 -05:00
flip1995
ff452d5ba6
Deny warning in every main sub-crate
This enables the same warnings that are enabled in `clippy_lints` also
in `clippy_utils` and `clippy_dev`. Then it makes sure, that the
`deny-warnings` feature is passed down to `clippy_lints` and
`clippy_utils` when compiling Clippy.
2021-05-18 11:05:48 +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