Commit 55ffa6cc authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add pre-commit config for pre-commit image

parent c7ad7691
Loading
Loading
Loading
Loading

.editorconfig

0 → 100644
+11 −0
Original line number Diff line number Diff line
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab

[*.{yml,yaml}]
indent_style = space
indent_size = 2

.gitlint

0 → 100644
+7 −0
Original line number Diff line number Diff line
[general]
ignore=body-trailing-whitespace,body-is-missing

[author-valid-email]
regex=.*@[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](\.[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9])+

# vim:ft=cfg
+38 −0
Original line number Diff line number Diff line
default_stages: [commit]
repos:

- repo: meta
  hooks:
  - id: check-hooks-apply
  - id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v3.4.0
  hooks:
  - id: check-added-large-files
  - id: check-case-conflict
  - id: check-merge-conflict
  - id: check-yaml
    args: [--allow-multiple-documents]
  - id: destroyed-symlinks
  - id: end-of-file-fixer
    stages: [commit, manual]
  - id: fix-byte-order-marker
  - id: mixed-line-ending
    args: [--fix=lf]
    stages: [commit, manual]
  - id: trailing-whitespace
    exclude_types: [markdown, plain-text]
    stages: [commit, manual]

- repo: https://github.com/jorisroovers/gitlint
  rev: v0.15.0
  hooks:
  - id: gitlint

- repo: https://code.kodo.org.uk/dom/pre-commit-hooks
  rev: v0.6
  hooks:
  - id: check-executable-modes
  - id: check-for-squash
  - id: protect-first-parent