We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c34309 commit e79caccCopy full SHA for e79cacc
.pre-commit-hooks.yaml
@@ -0,0 +1,6 @@
1
+---
2
+- id: commit-message-validator
3
+ name: Commit Message Validator
4
+ description: Checks that commit messages are compliant with Lumapps rules.
5
+ entry: check_message.sh
6
+ language: script
check_message.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+set -eu
+if [[ -v ZSH_NAME ]]; then
+ setopt BASH_REMATCH
7
+ setopt RE_MATCH_PCRE
8
+ setopt KSH_ARRAYS
9
+fi
10
11
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
12
+source $DIR/validator.sh
13
14
+MESSAGE=$(<"$1")
15
+echo "checking commit message: '${MESSAGE}'"
16
+validate "$MESSAGE"
17
18
+echo "Message succesfully checked"
0 commit comments