Skip to content

Implement more lints and integration tests #21

Implement more lints and integration tests

Implement more lints and integration tests #21

Triggered via push August 13, 2023 13:33
Status Failure
Total duration 3m 25s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

check.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 5 warnings
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: src/lib.rs#L332
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> src/lib.rs:332:13 | 332 | / match file.enclosed_name().map(Path::to_path_buf) { 333 | | Some(p) => { 334 | | if file.is_file() { 335 | | if p.extension().filter(|e| e == &"pak").is_some() { ... | 354 | | _ => {} 355 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match = note: `-D clippy::single-match` implied by `-D warnings` help: try | 332 ~ if let Some(p) = file.enclosed_name().map(Path::to_path_buf) { 333 + if file.is_file() { 334 + if p.extension().filter(|e| e == &"pak").is_some() { 335 + let mut buf = vec![]; 336 + file.read_to_end(&mut buf) 337 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 338 + files.push(( 339 + p.to_path_buf(), 340 + PakOrNotPak::Pak(Box::new(Cursor::new(buf))), 341 + )); 342 + } else { 343 + let mut buf = vec![]; 344 + file.read_to_end(&mut buf) 345 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 346 + files.push(( 347 + p.to_path_buf(), 348 + PakOrNotPak::NotPak(Box::new(Cursor::new(buf))), 349 + )); 350 + } 351 + } 352 + } |
length comparison to zero: src/lib.rs#L323
error: length comparison to zero --> src/lib.rs:323:12 | 323 | if archive.len() == 0 { | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `archive.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `-D clippy::len-zero` implied by `-D warnings`
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: src/lib.rs#L332
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> src/lib.rs:332:13 | 332 | / match file.enclosed_name().map(Path::to_path_buf) { 333 | | Some(p) => { 334 | | if file.is_file() { 335 | | if p.extension().filter(|e| e == &"pak").is_some() { ... | 354 | | _ => {} 355 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match = note: `-D clippy::single-match` implied by `-D warnings` help: try | 332 ~ if let Some(p) = file.enclosed_name().map(Path::to_path_buf) { 333 + if file.is_file() { 334 + if p.extension().filter(|e| e == &"pak").is_some() { 335 + let mut buf = vec![]; 336 + file.read_to_end(&mut buf) 337 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 338 + files.push(( 339 + p.to_path_buf(), 340 + PakOrNotPak::Pak(Box::new(Cursor::new(buf))), 341 + )); 342 + } else { 343 + let mut buf = vec![]; 344 + file.read_to_end(&mut buf) 345 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 346 + files.push(( 347 + p.to_path_buf(), 348 + PakOrNotPak::NotPak(Box::new(Cursor::new(buf))), 349 + )); 350 + } 351 + } 352 + } |
length comparison to zero: src/lib.rs#L323
error: length comparison to zero --> src/lib.rs:323:12 | 323 | if archive.len() == 0 { | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `archive.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `-D clippy::len-zero` implied by `-D warnings`
check
Clippy had exited with the 101 exit code
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: src/lib.rs#L332
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> src/lib.rs:332:13 | 332 | / match file.enclosed_name().map(Path::to_path_buf) { 333 | | Some(p) => { 334 | | if file.is_file() { 335 | | if p.extension().filter(|e| e == &"pak").is_some() { ... | 354 | | _ => {} 355 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match = note: `-D clippy::single-match` implied by `-D warnings` help: try | 332 ~ if let Some(p) = file.enclosed_name().map(Path::to_path_buf) { 333 + if file.is_file() { 334 + if p.extension().filter(|e| e == &"pak").is_some() { 335 + let mut buf = vec![]; 336 + file.read_to_end(&mut buf) 337 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 338 + files.push(( 339 + p.to_path_buf(), 340 + PakOrNotPak::Pak(Box::new(Cursor::new(buf))), 341 + )); 342 + } else { 343 + let mut buf = vec![]; 344 + file.read_to_end(&mut buf) 345 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 346 + files.push(( 347 + p.to_path_buf(), 348 + PakOrNotPak::NotPak(Box::new(Cursor::new(buf))), 349 + )); 350 + } 351 + } 352 + } |
length comparison to zero: src/lib.rs#L323
error: length comparison to zero --> src/lib.rs:323:12 | 323 | if archive.len() == 0 { | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `archive.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `-D clippy::len-zero` implied by `-D warnings`
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: src/lib.rs#L332
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> src/lib.rs:332:13 | 332 | / match file.enclosed_name().map(Path::to_path_buf) { 333 | | Some(p) => { 334 | | if file.is_file() { 335 | | if p.extension().filter(|e| e == &"pak").is_some() { ... | 354 | | _ => {} 355 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match = note: `-D clippy::single-match` implied by `-D warnings` help: try | 332 ~ if let Some(p) = file.enclosed_name().map(Path::to_path_buf) { 333 + if file.is_file() { 334 + if p.extension().filter(|e| e == &"pak").is_some() { 335 + let mut buf = vec![]; 336 + file.read_to_end(&mut buf) 337 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 338 + files.push(( 339 + p.to_path_buf(), 340 + PakOrNotPak::Pak(Box::new(Cursor::new(buf))), 341 + )); 342 + } else { 343 + let mut buf = vec![]; 344 + file.read_to_end(&mut buf) 345 + .map_err(|e| GetAllFilesFromDataError::Other(e.into()))?; 346 + files.push(( 347 + p.to_path_buf(), 348 + PakOrNotPak::NotPak(Box::new(Cursor::new(buf))), 349 + )); 350 + } 351 + } 352 + } |
length comparison to zero: src/lib.rs#L323
error: length comparison to zero --> src/lib.rs:323:12 | 323 | if archive.len() == 0 { | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `archive.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `-D clippy::len-zero` implied by `-D warnings`
check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, 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/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/