diff --git a/.github/workflows/code_analysis.yml b/.github/workflows/code_analysis.yml index 7bc220ab60088..30abb91e96e71 100644 --- a/.github/workflows/code_analysis.yml +++ b/.github/workflows/code_analysis.yml @@ -64,11 +64,12 @@ jobs: - name: Install ruff uses: astral-sh/ruff-action@v3 with: + version: "latest" args: "--version" - name: Lint code run: | - files=$(cat changed_files.txt | grep '\.py$' || echo "") + files=$(grep '\.py$' changed_files.txt || echo "") if [ -n "$files" ]; then echo "$files" | xargs ruff check --diff || true echo "$files" | xargs ruff check @@ -79,7 +80,7 @@ jobs: - name: Format code if: always() run: | - files=$(cat changed_files.txt | grep '\.py$' || echo "") + files=$(grep '\.py$' changed_files.txt || echo "") if [ -n "$files" ]; then diff_command="" apply_command=""