Skip to content

Commit 6ea5a9f

Browse files
committed
Add tips when unittest error
1 parent 4afaaa4 commit 6ea5a9f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

paddle/scripts/travis/precommit.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
#!/bin/bash
2+
function abort(){
3+
echo "Your commit not fit PaddlePaddle code style" 1>&2
4+
echo "Please use pre-commit scripts to auto-format your code" 1>&2
5+
exit 1
6+
}
7+
8+
trap 'abort' 0
29
set -e
310
source common.sh
411
cd ..
512
export PATH=/usr/bin:$PATH
613
pre-commit install
714
clang-format --version
815
pre-commit run -a
16+
17+
trap : 0

0 commit comments

Comments
 (0)