1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 05:20:45 +00:00
serenity/.pre-commit-config.yaml
Brian Gianforcaro f91bfe8009 Meta: pre-commit should run lint-ports.py only when Ports change
Most of the existing lint-ing shell scripts have the ability
to only run on the files which have actually changed.
The new port lint-ing script doesn't have this functionality
unfortunately. This forces us to lint ALL the ports on every
single change to any other file in the system if you have
the pre-commit hook setup for your git clone locally.

Instead we can use pre-commit's feature to only run a hook
if certain files have changed to reduce the situations in
which we would run the Meta/lint-ports.py script.
2021-04-30 21:24:22 +02:00

16 lines
453 B
YAML

repos:
- repo: local
hooks:
- id: meta-lint-ci
name: Running Meta/lint-ci.sh to ensure changes will pass linting on CI
entry: bash Meta/lint-ci.sh
args: [ --no-ports ]
language: system
- id: meta-lint-ports
name: Running Meta/lint-ports.py to ensure changes will pass linting on CI
entry: Meta/lint-ports.py
pass_filenames: false
files: ^Ports/
language: system