Merge pull request #3114 from thowell:lint

PiperOrigin-RevId: 872331279
Change-Id: I26848d48e3f66f29f32a9a03ab38f373123abd1d
This commit is contained in:
Copybara-Service
2026-02-19 04:31:19 -08:00
2 changed files with 26 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# Run pre-commit hooks on files changed in the PR only.
name: lint
on:
pull_request:
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
+6
View File
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer