Commit c08f917f authored by Sebastian Brzezinka's avatar Sebastian Brzezinka Committed by Tomasz Zawadzki
Browse files

scripts/check_format: check if astyle version is lower than 3.4



There are some differences in formatting between astyle versions
making astyle 3.4 incompatible with previous one. Fail style check if
version of astyle is not supported.

Signed-off-by: default avatarSebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: Ifb56b063d86b6045cb54249142370d2fc9d29162
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20494


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 986fb7b3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -129,8 +129,13 @@ function check_c_style() {

	if hash astyle; then
		echo -n "Checking coding style..."
		if [ "$(astyle -V)" \< "Artistic Style Version 3" ]; then
			echo -n " Your astyle version is too old so skipping coding style checks. Please update astyle to at least 3.0.1 version..."
		version=$(astyle --version | awk '{print $NF}')
		if lt "$version" 3.0.1; then
			echo " Your astyle version is too old so skipping coding style checks. Please update astyle to at least 3.0.1 version..."
			rc=1
		elif ge "$version" 3.4; then
			echo " Your astyle version is too new so skipping coding style checks. Please use astyle version < 3.4"
			rc=1
		else
			rm -f astyle.log
			touch astyle.log