Skip to content

[CI] [Backport 12.4] Lint code with PHP 8.4 (#4776) #260

[CI] [Backport 12.4] Lint code with PHP 8.4 (#4776)

[CI] [Backport 12.4] Lint code with PHP 8.4 (#4776) #260

Workflow file for this run

name: Check Whitespace on Pull Request
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit hooks
id: pre-commit
run: |
# Run pre-commit and capture output
pre-commit run --all-files --show-diff-on-failure --hook-stage=manual
# Capture the status code from pre-commit
STATUS=$?
# Display the status code
echo "Pre-commit status code: $STATUS"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}