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

docs: use nightly clippy in vscode #840

Merged
merged 4 commits into from
Jan 13, 2023
Merged

Conversation

leruaa
Copy link
Contributor

@leruaa leruaa commented Jan 12, 2023

Before this small fix, I had a bunch of Clippy warnings/errors on VS Code.

Before this small fix, I had a bunch of Clippy warnings/errors on VS Code.
@leruaa leruaa requested a review from gakonst as a code owner January 12, 2023 19:48
@leruaa
Copy link
Contributor Author

leruaa commented Jan 12, 2023

Wait, actually, it's not working well
Edit: All good, "--message-format=json" was missing

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2023

Codecov Report

Merging #840 (b62a8fc) into main (33c9cbe) will increase coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #840      +/-   ##
==========================================
+ Coverage   73.25%   73.32%   +0.07%     
==========================================
  Files         278      278              
  Lines       29282    29282              
==========================================
+ Hits        21450    21472      +22     
+ Misses       7832     7810      -22     
Flag Coverage Δ
unit-tests 73.32% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
crates/transaction-pool/src/pool/txpool.rs 59.37% <0.00%> (+0.50%) ⬆️
crates/transaction-pool/src/test_utils/mock.rs 59.70% <0.00%> (+6.59%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I'm not a RA user so can't really comment on this

wdyt @rkrasiuk

@mattsse mattsse added the C-docs An addition or correction to our documentation label Jan 13, 2023
@onbjerg onbjerg added C-test A change that impacts how or what we test and removed C-docs An addition or correction to our documentation labels Jan 13, 2023
@onbjerg onbjerg changed the title Get rid of stable Clippy warnings/errors chore: fix clippy Jan 13, 2023
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

You can just add +nightly

Comment on lines +93 to +100
"rust-analyzer.checkOnSave.overrideCommand": [
"cargo",
"+nightly",
"clippy",
"--all",
"--all-features",
"--message-format=json"
],
Copy link
Member

@onbjerg onbjerg Jan 13, 2023

Choose a reason for hiding this comment

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

Suggested change
"rust-analyzer.checkOnSave.overrideCommand": [
"cargo",
"+nightly",
"clippy",
"--all",
"--all-features",
"--message-format=json"
],
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.checkOnSave.features": "all",
"rust-analyzer.checkOnSave.extraArgs": ["+nightly"],

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It not working for me:

[ERROR flycheck] Flycheck failed to run the following command: "cargo" "check" "--workspace" "--message-format=json" "--manifest-path" "/workspaces/crypto/learn/ethereum/reth/reth/Cargo.toml" "--all-targets" "+nightly"
[ERROR rust_analyzer::lsp_utils] cargo check failed

Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(256))):
error: Found argument '+nightly' which wasn't expected, or isn't valid in this context

Copy link
Member

@onbjerg onbjerg Jan 13, 2023

Choose a reason for hiding this comment

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

Sorry, add rust-analyzer.checkOnSave.command to clippy as well. Updated my suggestion to include the new things

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm I have a similar error:

[ERROR flycheck] Flycheck failed to run the following command: "cargo" "clippy" "--workspace" "--message-format=json" "--manifest-path" "/workspaces/crypto/learn/ethereum/reth/reth/Cargo.toml" "--all-targets" "--all-features" "+nightly"
[ERROR rust_analyzer::lsp_utils] cargo check failed

Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(256))):
error: Found argument '+nightly' which wasn't expected, or isn't valid in this context

Copy link
Member

Choose a reason for hiding this comment

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

Alright, strange. This is fine then, thank you for being patient!

@onbjerg onbjerg changed the title chore: fix clippy docs: use nightly clippy in vscode Jan 13, 2023
@onbjerg onbjerg added C-docs An addition or correction to our documentation and removed C-test A change that impacts how or what we test labels Jan 13, 2023
@onbjerg onbjerg merged commit 7ef2931 into paradigmxyz:main Jan 13, 2023
@leruaa leruaa deleted the patch-1 branch January 21, 2023 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants