From 77c62a28e1a63e01cc889578f84962acced17262 Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Thu, 19 Dec 2024 11:49:38 -0800 Subject: [PATCH] restore changes to yml --- .github/workflows/ruff_linter.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruff_linter.yml b/.github/workflows/ruff_linter.yml index 6041e5b1f..027279721 100644 --- a/.github/workflows/ruff_linter.yml +++ b/.github/workflows/ruff_linter.yml @@ -65,7 +65,15 @@ jobs: - name: Regular lint check if: github.event_name != 'workflow_dispatch' run: | - sh scripts/run_ruff.sh --check + ruff check . + # --isolated is used to skip the allowlist at all so this applies to all files + # please be careful when using this large changes means everyone needs to rebase + ruff check --isolated --select F821,F823,W191 + ruff check --select F,I + ruff format --check || { + echo "Ruff check failed, please try again after running 'ruff format'." + exit 1 + } - name: Apply fixes to PR if: github.event_name == 'workflow_dispatch' @@ -74,7 +82,8 @@ jobs: git config --global user.email 'github-actions[bot]@users.noreply.github.com' # Apply fixes - sh scripts/run_ruff.sh + ruff check --select F,I --fix + ruff format . # Commit and push if there are changes if [[ -n "$(git status --porcelain)" ]]; then