-
Notifications
You must be signed in to change notification settings - Fork 1
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
[implant] Add code quality tools #34
base: release/1.11.0
Are you sure you want to change the base?
Conversation
} | ||
|
||
pub fn handle_execution_command( | ||
semantic: &str, | ||
api: &Client, | ||
inject_id: String, | ||
command: &String, | ||
executor: &String, | ||
executor: &str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Why changing executor type and not command as well ?
@@ -124,7 +124,7 @@ pub fn handle_payload(inject_id: String, api: &Client, contract_payload: &Inject | |||
let executor = contract_payload.payload_cleanup_executor.clone().unwrap(); | |||
let _ = handle_execution_command( | |||
"cleanup execution", | |||
&api, | |||
api, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, $api allows you to use the $api variable directly without making a copy.
Wouldn't it be more efficient to keep $api everywhere?
@@ -106,6 +106,17 @@ jobs: | |||
- run: sudo apt-get -y install curl musl-tools | |||
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y | |||
- run: . "$HOME/.cargo/env"; rustup target add x86_64-unknown-linux-musl | |||
# Install quality tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: Can we add the fact of putting the build in error if we have warnings during compilation?
.expect("Failed to create TLS config with crypto provider"); | ||
let config = ClientConfig::builder_with_provider(arc_crypto_provider) | ||
.with_safe_default_protocol_versions() | ||
.unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Can we keep the expect here ?
.expect("Failed to create TLS config with crypto provider")
let config = ClientConfig::builder_with_provider(arc_crypto_provider) | ||
.with_safe_default_protocol_versions() | ||
.unwrap() | ||
.with_platform_verifier() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Why adding this line ?
Can we take advantage of your PR to push this renovation through? Thank you |
Proposed changes
Chunck 1:
Add the next code quality tools to CI for Linux & Mac :
→ Cllippy: lint checks https://github.com/rust-lang/rust-clippy
→ Rustfmt: format code
→ Cargo Audit: check security dependencies (Linux, Mac)
→ test
After apply these tools some files were updated.
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...