From 43d38baddc32737e09e3ae174e44baf9e867ada3 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Sat, 11 Apr 2026 14:45:36 +0100 Subject: [PATCH 1/2] clippy: fix io_other_error lint https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#io_other_error --- src/uu/tar/tests/test_errors.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/uu/tar/tests/test_errors.rs b/src/uu/tar/tests/test_errors.rs index 98b7acb..8bb41a0 100644 --- a/src/uu/tar/tests/test_errors.rs +++ b/src/uu/tar/tests/test_errors.rs @@ -44,10 +44,7 @@ fn test_tar_error_code() { .code(), 2 ); - assert_eq!( - TarError::Io(io::Error::new(io::ErrorKind::Other, "test")).code(), - 2 - ); + assert_eq!(TarError::Io(io::Error::other("test")).code(), 2); } #[test] From 16949192ec9faeaf5c6a7964315fd208b501cd5d Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Sat, 11 Apr 2026 14:51:26 +0100 Subject: [PATCH 2/2] fix: update clippy command to use workspace option --- .github/workflows/code-quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index bf2d596..453485a 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -70,5 +70,5 @@ jobs: fault_type="${{ steps.vars.outputs.FAULT_TYPE }}" fault_prefix=$(echo "$fault_type" | tr '[:lower:]' '[:upper:]') # * convert any warnings to GHA UI annotations; ref: - S=$(cargo clippy --all-targets -ptarapp -- ${CLIPPY_FLAGS} -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; } + S=$(cargo clippy --workspace --all-targets -ptarapp -- ${CLIPPY_FLAGS} -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; } if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi