From 3268f5d847a9091b3bc388341d04bf8cc3f6397f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Peccatte?= Date: Thu, 7 Jul 2016 15:30:28 +0200 Subject: [PATCH] Fixes #8646: Add a technique check to make sure &endif& are followed by an empty line --- scripts/check-techniques.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/check-techniques.sh b/scripts/check-techniques.sh index 57b384953..83cc32457 100755 --- a/scripts/check-techniques.sh +++ b/scripts/check-techniques.sh @@ -150,6 +150,15 @@ do fi done || EXIT=1 +# Check that there is an empry line after each endif +${REPOSITORY_PATH}/scripts/technique-files -l -f '*.cf' -f '*.st' "${REPOSITORY_PATH}" | while read filename +do + if grep -n -A1 "^[[:space:]]*&endif&[[:space:]]*$" "${filename}" | grep -E -B1 -- "^[[:digit:]]+-.+"; then + echo "&endif& not followed by an empty line in ${filename}" + exit 1 + fi +done || EXIT=1 + if [ ${EXIT} -eq 0 ]; then echo "This repository seems clean" else