mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Add pre-commit hooks
This currently checks commit messages and editorconfig.
This commit is contained in:
parent
da7003a2f2
commit
adb486bbb9
18
.gitlint
Normal file
18
.gitlint
Normal file
|
@ -0,0 +1,18 @@
|
|||
[general]
|
||||
regex-style-search=true
|
||||
contrib=contrib-allowed-authors
|
||||
ignore=body-is-missing
|
||||
|
||||
# While they should be ≤72, 80 is the limit
|
||||
[title-max-length]
|
||||
line-length=80
|
||||
|
||||
# Every message must start with an upper case letter
|
||||
[title-match-regex]
|
||||
regex=^[A-Z]
|
||||
|
||||
[ignore-by-title]
|
||||
regex=^(amend|fixup|squash).*
|
||||
ignore=title-max-length
|
||||
|
||||
[contrib-allowed-authors]
|
29
.pre-commit-config.yaml
Normal file
29
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
default_install_hook_types:
|
||||
- commit-msg
|
||||
- post-commit
|
||||
- pre-commit
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/jorisroovers/gitlint
|
||||
rev: v0.19.1
|
||||
hooks:
|
||||
- id: gitlint
|
||||
name: Lint git commit message
|
||||
|
||||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
||||
rev: 2.7.3
|
||||
hooks:
|
||||
- id: editorconfig-checker
|
||||
alias: ec
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: gitlint-author
|
||||
name: Check commit author
|
||||
description: This hook checks the commit author after the commit (without rejecting)
|
||||
entry: gitlint
|
||||
language: system
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
stages:
|
||||
- post-commit
|
7
AUTHORS.txt
Normal file
7
AUTHORS.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
Denis Natusch <denis.natusch@mailbox.tu-dresden.de>
|
||||
Eren Asker <eren.asker@mailbox.tu-dresden.de>
|
||||
Erik Hohlfeld <erik.hohlfeld@mailbox.tu-dresden.de>
|
||||
Mathis Kral <mathis_tiberius.kral@mailbox.tu-dresden.de>
|
||||
Paul Heimer <heimerp54@gmail.com>
|
||||
Simon Bruder <simon.bruder@mailbox.tu-dresden.de>
|
||||
Theo Reichert <theo.reichert@mailbox.tu-dresden.de>
|
Loading…
Reference in a new issue