Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_revset.rs: disable clippy false-positive warning #1686

Merged
merged 1 commit into from
Jun 11, 2023

Conversation

ilyagr
Copy link
Collaborator

@ilyagr ilyagr commented Jun 11, 2023

I opened a bug for the clippy error:
frondeus/test-case#122

@ilyagr ilyagr enabled auto-merge (rebase) June 11, 2023 05:57
Copy link
Owner

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it has to be guarded by a check of the Rust version

@ilyagr
Copy link
Collaborator Author

ilyagr commented Jun 11, 2023

I guess it has to be guarded by a check of the Rust version

I couldn't find an easy way to do that, surprisingly. Apparently, there's a special crate to make it possible.

So, I used a slightly less elegant solution.

@ilyagr ilyagr merged commit 738f99d into martinvonz:main Jun 11, 2023
14 checks passed
@ilyagr ilyagr deleted the items_after_test branch June 11, 2023 20:26
ilyagr added a commit to ilyagr/jj that referenced this pull request Jul 10, 2023
https://github.com/ericseppanen/cargo-cranky seems like a useful tool for
cases like mitsuhiko/insta#389 and
martinvonz#1686.

It should probably not be checked in, though. It can be put into
`.git/info/excludes`, but that's harder on non-colocated repos and I'm not
100% certain jj properly ignores the files in there in all circumstances.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jul 10, 2023
https://github.com/ericseppanen/cargo-cranky seems like a useful tool for
cases like mitsuhiko/insta#389 (cc martinvonz#1834) and
martinvonz#1686.

It should probably not be checked in, though. It can be put into
`.git/info/excludes`, but that's harder on non-colocated repos and I'm not
100% certain jj properly ignores the files in there in all circumstances.

The idea is to use this with VS Code or to simplify command-line clippy
invocation.
@ilyagr
Copy link
Collaborator Author

ilyagr commented Jul 10, 2023

Good news: AFAICT, frondeus/test-case#122 is fixed now in every Rust version (possibly requiring a rustup update) thanks to some very friendly Rust maintainers. I'll probably remove the workaround in a few days, perhaps after the upcoming stable Rust release.

ilyagr added a commit to ilyagr/jj that referenced this pull request Jul 11, 2023
https://github.com/ericseppanen/cargo-cranky seems like a useful tool for
cases like mitsuhiko/insta#389 (cc martinvonz#1834) and
martinvonz#1686.

It should probably not be checked in, though. It can be put into
`.git/info/excludes`, but that's harder on non-colocated repos and I'm not
100% certain jj properly ignores the files in there in all circumstances.

The idea is to use this with VS Code or to simplify command-line clippy
invocation. For example, until mitsuhiko/insta#389
is fixed, you can put the following into your `Cranky.toml`:

```toml
allow = [
"clippy::needless_raw_string_hashes"
]
```

Then, you can have VS code use `cargo cranky` instead of `cargo check` or
`cargo clippy` and continue to use nightly clippy.

The other possible solution, of course, would be to switch to beta clippy.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jul 11, 2023
https://github.com/ericseppanen/cargo-cranky seems like a useful tool for
cases like mitsuhiko/insta#389 (cc martinvonz#1834) and
martinvonz#1686.

It should probably not be checked in, though. It can be put into
`.git/info/excludes`, but that's harder on non-colocated repos and I'm not
100% certain jj properly ignores the files in there in all circumstances.

The idea is to use this with VS Code or to simplify command-line clippy
invocation. For example, until mitsuhiko/insta#389
is fixed, you can put the following into your `Cranky.toml`:

```toml
allow = [
"clippy::needless_raw_string_hashes"
]
```

Then, you can have VS code use `cargo cranky` instead of `cargo check` or
`cargo clippy` and continue to use nightly clippy.

The other possible solution, of course, would be to switch to beta clippy.
@ilyagr ilyagr mentioned this pull request Jul 11, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants