File tree 2 files changed +30
-2
lines changed
2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Git hooks for KUDO. Install with
2
+ # pre-commit install -t pre-commit -t commit-msg
1
3
repos :
2
- - repo : git://github.com/golangci/golangci-lint
3
- rev : v1.22.0
4
+ - repo : local
4
5
hooks :
5
6
- id : golangci-lint
7
+ name : golangci-lint
8
+ description : Check that source code is linted
9
+ entry : make lint
10
+ language : system
11
+ stages : [commit]
12
+ - repo : local
13
+ hooks :
14
+ - id : signed-off-commits
15
+ name : signed-off-commits
16
+ description : Check that commit messages include a 'Signed-off-by' line
17
+ entry : ./hack/check-commit-signed-off.sh
18
+ language : script
19
+ stages : [commit-msg]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -o errexit
4
+ set -o nounset
5
+ set -o pipefail
6
+
7
+ file=" $1 "
8
+
9
+ signedoff_regex=' ^Signed-off-by: '
10
+
11
+ if [ " $( grep -c " $signedoff_regex " " $file " ) " != " 1" ]; then
12
+ printf >&2 " Signed-off-by line is missing.\n"
13
+ exit 1
14
+ fi
You can’t perform that action at this time.
0 commit comments