mirror of https://github.com/oxen-io/lokinet
add format verification to contrib/format.sh
run with ./contrib/format.sh verify exits with 0 if we are good, exits non-zero if we are not formatted right
This commit is contained in:
parent
696c6d1b5a
commit
6e67f38408
|
@ -16,6 +16,9 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# TODO: readlink -e is a GNU-ism
|
||||
cd "$(readlink -e $(dirname $0)/../)"
|
||||
$binary -i $(find jni daemon llarp include pybind | grep -E '\.[hc](pp)?$') &> /dev/null
|
||||
cd "$(dirname $0)/../"
|
||||
if [ "$1" = "verify" ] ; then
|
||||
exit $($binary --output-replacements-xml $(find jni daemon llarp include pybind | grep -E '\.[hc](pp)?$' | grep -v '\#') | grep '</replacement>' | wc -l)
|
||||
else
|
||||
$binary -i $(find jni daemon llarp include pybind | grep -E '\.[hc](pp)?$' | grep -v '\#') &> /dev/null
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue