check_format.sh: skip coding style checks if astyle is too old

check_format.sh isn't really function when astyle is too old - it
reports a bunch of style errors that don't really exist.  So just
skip running astyle in these cases.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifee769a296791d11b1ec693d398922e87d76bb69

Reviewed-on: https://review.gerrithub.io/435960
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2018-12-03 13:51:56 -07:00
parent 6c8af3ef7a
commit 760bb7e862

View File

@ -63,8 +63,8 @@ if hash astyle; then
echo -n "Checking coding style..." echo -n "Checking coding style..."
if [ "$(astyle -V)" \< "Artistic Style Version 3" ] if [ "$(astyle -V)" \< "Artistic Style Version 3" ]
then then
echo -n " Your astyle version is too old. This may cause failure on patch verification performed by CI. Please update astyle to at least 3.0.1 version..." echo -n " Your astyle version is too old so skipping coding style checks. Please update astyle to at least 3.0.1 version..."
fi else
rm -f astyle.log rm -f astyle.log
touch astyle.log touch astyle.log
# Exclude rte_vhost code imported from DPDK - we want to keep the original code # Exclude rte_vhost code imported from DPDK - we want to keep the original code
@ -87,6 +87,7 @@ if hash astyle; then
echo " OK" echo " OK"
fi fi
rm -f astyle.log rm -f astyle.log
fi
else else
echo "You do not have astyle installed so your code style is not being checked!" echo "You do not have astyle installed so your code style is not being checked!"
fi fi