File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,9 @@ $ (cd utils; ./sqldep_to_schema_dot) <demo/data/all.dep |dot -Tsvg >demo/data/sc
52
52
$ cd demo/data
53
53
$ make
54
54
```
55
+
56
+ ### Fully automatic
57
+
58
+ Checks can be run before each commit using a pre-commit hook.
59
+ Please install [ ` hooks/pre-commit ` ] ( hooks/pre-commit )
60
+ into each of your repositories' ` .git/hooks ` .
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Redirect output to stderr.
4
+ exec 1>&2
5
+
6
+ DATA=$( git config hooks.projectdata)
7
+ if [ -z " $DATA " ]; then
8
+ echo error: please configure the data root in hooks.projectdata >&2
9
+ exit 1
10
+ fi
11
+
12
+ PROJECT=$( basename " $( git rev-parse --show-toplevel) " )
13
+ if ! grep " all.dep:.* $PROJECT \.dep" $DATA /Makefile > /dev/null; then
14
+ echo warning: this project is NOT analyzed by sqldep >&2
15
+ fi
16
+
17
+ (cd $DATA && make check)
You can’t perform that action at this time.
0 commit comments