diff --git a/.github/workflows/reusable-18-autofix.yml b/.github/workflows/reusable-18-autofix.yml index 3037d5df1..4e9d49076 100644 --- a/.github/workflows/reusable-18-autofix.yml +++ b/.github/workflows/reusable-18-autofix.yml @@ -541,7 +541,12 @@ jobs: done for dir in "${filtered_py_dirs[@]}"; do clean_dir="${dir#./}" - if [[ -n "$clean_dir" ]]; then allowed_patterns+=("${clean_dir}/**"); fi + # Handle root directory: "." or empty becomes "**" to match all files + if [[ -z "$clean_dir" || "$clean_dir" == "." ]]; then + allowed_patterns+=("**") + else + allowed_patterns+=("${clean_dir}/**") + fi done if [ ${#allowed_patterns[@]} -eq 0 ]; then allowed_patterns=("**/*.py"); fi fi