2021-11-08 14:20:26 +00:00
|
|
|
# See CONTRIBUTING.md for instructions.
|
|
|
|
# See https://pre-commit.com for more information
|
|
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
|
|
|
|
|
|
# Commitizen runs in commit-msg stage
|
|
|
|
# but we don't want to run the other hooks on commit messages
|
|
|
|
default_stages: [commit]
|
|
|
|
|
|
|
|
repos:
|
|
|
|
# Check formatting and lint for starlark code
|
|
|
|
- repo: https://github.com/keith/pre-commit-buildifier
|
2024-01-03 08:16:47 +00:00
|
|
|
rev: 6.4.0
|
2021-11-08 14:20:26 +00:00
|
|
|
hooks:
|
|
|
|
- id: buildifier
|
|
|
|
- id: buildifier-lint
|
|
|
|
# Enforce that commit messages allow for later changelog generation
|
|
|
|
- repo: https://github.com/commitizen-tools/commitizen
|
2024-01-03 08:16:47 +00:00
|
|
|
rev: v3.13.0
|
2021-11-08 14:20:26 +00:00
|
|
|
hooks:
|
|
|
|
# Requires that commitizen is already installed
|
|
|
|
- id: commitizen
|
|
|
|
stages: [commit-msg]
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
2024-01-03 08:16:47 +00:00
|
|
|
rev: v3.1.0
|
2021-11-08 14:20:26 +00:00
|
|
|
hooks:
|
|
|
|
- id: prettier
|
2023-02-17 18:12:41 +00:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-01-03 08:16:47 +00:00
|
|
|
rev: v4.5.0
|
2023-02-17 18:12:41 +00:00
|
|
|
hooks:
|
|
|
|
- id: check-added-large-files
|
|
|
|
- id: check-byte-order-marker
|
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-symlinks
|
|
|
|
- id: destroyed-symlinks
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
exclude: &exclude_pattern "^(docs|e2e|lib/tests)/"
|
|
|
|
- id: mixed-line-ending
|
|
|
|
- id: trailing-whitespace
|
2023-12-08 07:34:24 +00:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: aspect_rules_lint
|
|
|
|
name: Format
|
|
|
|
language: system
|
|
|
|
entry: bazel run //:format
|
|
|
|
files: .*
|