mirror of https://github.com/PentHertz/srsLTE.git
Check the format of modified lines only
Use the -U0 option to generate a patch that contains only the modified lines without any context
This commit is contained in:
parent
20ff016e40
commit
dc9df9f08f
|
@ -44,7 +44,7 @@ target=$1
|
||||||
echo "Running code format check between ${target} and ${commit} .."
|
echo "Running code format check between ${target} and ${commit} .."
|
||||||
|
|
||||||
# run clang-format
|
# run clang-format
|
||||||
diff="$(git diff ${target} | clang-format-diff -p1 | python3 -c 'data = open(0).read(); print(data); exit(1 if data else 0)')"
|
diff="$(git diff -U0 ${target} | clang-format-diff -p1 | python3 -c 'data = open(0).read(); print(data); exit(1 if data else 0)')"
|
||||||
|
|
||||||
# safe return code
|
# safe return code
|
||||||
ret=$?
|
ret=$?
|
||||||
|
|
Loading…
Reference in New Issue