diff --git a/.gitlint b/.gitlint new file mode 100644 index 0000000..203a36e --- /dev/null +++ b/.gitlint @@ -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] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..eebb675 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/AUTHORS.txt b/AUTHORS.txt new file mode 100644 index 0000000..9910cc5 --- /dev/null +++ b/AUTHORS.txt @@ -0,0 +1,7 @@ +Denis Natusch +Eren Asker +Erik Hohlfeld +Mathis Kral +Paul Heimer +Simon Bruder +Theo Reichert diff --git a/shell.nix b/shell.nix index 098e143..06666a0 100644 --- a/shell.nix +++ b/shell.nix @@ -3,8 +3,15 @@ with pkgs; mkShell { buildInputs = [ asciidoctor + editorconfig-checker + gitlint jdk17 plantuml + pre-commit watchexec # enables automatic compiling on change ]; + + shellHook = '' + pre-commit install + ''; }