From 72eb5858abf20eac85c934b9ccef8c566440b34f Mon Sep 17 00:00:00 2001 From: Saber Haj Rabiee Date: Tue, 12 Nov 2024 04:22:42 -0800 Subject: [PATCH] fix: run `autofix.ci` over members with no features --- .github/workflows/autofix.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index a0d4331e3d..0c2656f946 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -28,10 +28,17 @@ jobs: echo "Running Clippy against each member's features (default features included)" for member in $(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | .name'); do - features=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"$member\") | .features | keys[]") echo "Working on member $member": + echo -e "\tdefault-features/no-features:" + # this will also run on members with no features or default features + cargo clippy --allow-dirty --fix --lib --package "$member" + + features=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"$member\") | .features | keys[]") for feature in $features; do - echo -e "\t feature $feature" + if [ "$feature" = "default" ]; then + continue + fi + echo -e "\tfeature $feature" cargo clippy --allow-dirty --fix --lib --package "$member" --features "$feature" done done