chore(deps-dev): bump ruff from 0.8.2 to 0.8.4 #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pre-commit | |
on: | |
# NOTE: This is a public repo, do not use pull_request_target without security review | |
pull_request: | |
paths-ignore: | |
- "CHANGELOG.md" | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- name: Create pre-commit config for patching | |
run: | | |
cp .pre-commit-config.yaml .pre-commit-config-patched.yaml | |
- name: Add log files to hooks | |
uses: mikefarah/[email protected] | |
with: | |
cmd: yq -i -o=yaml '. as $root | $root.repos[].hooks[] | .log_file = (["/tmp/", .id, ".log"] | join("")) | $root' .pre-commit-config-patched.yaml | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: '--all-files --config .pre-commit-config-patched.yaml' | |
- name: Annotate ruff errors | |
run: | | |
cat <<'EOF' > /tmp/ruff-problem-matcher.json | |
{ | |
"problemMatcher": [{ | |
"owner": "ruff", | |
"pattern": [{ | |
"regexp": "^(.*):(\\d+):(\\d+):\\s+(\\w+)\\s+(.*)$", | |
"file": 1, | |
"line": 2, | |
"column": 3, | |
"code": 4, | |
"message": 5 | |
}] | |
}] | |
} | |
EOF | |
echo "::add-matcher::/tmp/ruff-problem-matcher.json" | |
sed -e 's/\x1b\[[0-9;]*m//g' /tmp/ruff.log | |
echo "::remove-matcher owner=ruff::" | |
if: failure() |