Commit e50cc5fd authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

scripts/check_format: check trailing whitespace



Fix up the two existing instances of trailing whitespace in text files,
and add a check to enforce that no new trailing whitespace is added.

Change-Id: I2197bed69bb356142aa6d2e4e8261c7434dd358b
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383291


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent ba90c887
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -29,4 +29,10 @@ if grep -q $'\r' "$f"; then
	exit 1
fi

if grep -q $'[\t ]$' "$f"; then
	echo "$f: Trailing whitespace"
	sed -i $'s/[ \t]*$//' "$f"
	exit 1
fi

exit 0
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.