Skip to content

Commit

Permalink
Fixes #8646: Add a technique check to make sure &endif& are followed …
Browse files Browse the repository at this point in the history
…by an empty line
  • Loading branch information
peckpeck committed Jul 7, 2016
1 parent 18c2f07 commit 3268f5d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/check-techniques.sh
Expand Up @@ -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
Expand Down

0 comments on commit 3268f5d

Please sign in to comment.