Skip to content

Commit

Permalink
restore changes to yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryzh168 committed Dec 19, 2024
1 parent 7d0f93c commit 77c62a2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ruff_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 77c62a2

Please sign in to comment.