Skip to content

Commit

Permalink
ci(FCL-176): Make pre-commit-hooks consistent across repos
Browse files Browse the repository at this point in the history
Pre-commit gives us a set of high-level hooks which rapidly sense-check aspects of the repository. This commit adds new ones for preventing the addition of large files, checking for filename casing conflicts, preventing committing of files with open merge conflicts, checking XML validity, preventing the addition of submodules, warning when files have mixed line endings, and accidentally committing to `main`. It also reorders this list for clarity.
  • Loading branch information
jacksonj04 committed Jul 1, 2024
1 parent dcef1b3 commit 68b94c7
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
exclude: "^docs/|/migrations/"
default_stages: [commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
- id: forbid-submodules
- id: mixed-line-ending
- id: no-commit-to-branch
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
Expand Down Expand Up @@ -42,9 +47,3 @@ repos:
hooks:
- id: prettier
types_or: [yaml, json, markdown]

# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autoupdate_schedule: weekly
skip: []
submodules: false

0 comments on commit 68b94c7

Please sign in to comment.