Skip to content

files

files #571

Triggered via push December 9, 2023 22:54
Status Success
Total duration 1m 14s
Artifacts

lint.yaml

on: push
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 3 warnings
variables can be used directly in the `format!` string: bin/bot/src/discord/handler/mod.rs#L254
error: variables can be used directly in the `format!` string --> bin/bot/src/discord/handler/mod.rs:254:47 | 254 | ... .reply_ping(&ctx, format!("Cannot update activity roles: {}", e)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args note: the lint level is defined here --> bin/bot/src/main.rs:1:9 | 1 | #![deny(clippy::pedantic, clippy::unwrap_used)] | ^^^^^^^^^^^^^^^^ = note: `#[deny(clippy::uninlined_format_args)]` implied by `#[deny(clippy::pedantic)]` help: change this to | 254 - .reply_ping(&ctx, format!("Cannot update activity roles: {}", e)) 254 + .reply_ping(&ctx, format!("Cannot update activity roles: {e}")) |
clippy
Clippy had exited with the 101 exit code
you seem to be trying to use `match` for an equality check. Consider using `if`: bin/bot/src/discord/handler/mod.rs#L244
warning: you seem to be trying to use `match` for an equality check. Consider using `if` --> bin/bot/src/discord/handler/mod.rs:244:13 | 244 | / match message.content.as_str() { 245 | | "!exec active" => { 246 | | if let Err(e) = events_request_2!( 247 | | bootstrap::NC::get().await, ... | 260 | | _ => {} 261 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match note: the lint level is defined here --> bin/bot/src/main.rs:2:26 | 2 | #![warn(clippy::nursery, clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::single_match)]` implied by `#[warn(clippy::all)]` help: try | 244 ~ if message.content.as_str() == "!exec active" { 245 + if let Err(e) = events_request_2!( 246 + bootstrap::NC::get().await, 247 + synixe_events::discord::executions, 248 + UpdateActivityRoles {} 249 + ) 250 + .await 251 + { 252 + message 253 + .reply_ping(&ctx, format!("Cannot update activity roles: {}", e)) 254 + .await 255 + .expect("Cannot send message"); 256 + } 257 + return; 258 + } |
the function has a cognitive complexity of (27/25): bin/hooks/src/missions.rs#L4
warning: the function has a cognitive complexity of (27/25) --> bin/hooks/src/missions.rs:4:14 | 4 | pub async fn list_updated() -> StatusCode { | ^^^^^^^^^^^^ | = help: you could split it up into multiple smaller functions = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity note: the lint level is defined here --> bin/hooks/src/main.rs:2:9 | 2 | #![warn(clippy::nursery, clippy::all)] | ^^^^^^^^^^^^^^^ = note: `#[warn(clippy::cognitive_complexity)]` implied by `#[warn(clippy::nursery)]`
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/