From 72fa809ac442f14e148a4017015df583b364700a Mon Sep 17 00:00:00 2001 From: Federico Rojas Date: Fri, 3 Feb 2023 15:25:56 +0100 Subject: [PATCH] Add two pipeline checks Add file check_code_before_sq_brackets.sh Add file check_no_lineids.sh --- bitbucket-pipelines.yml | 3 +++ check_code_before_sq_brackets.sh | 6 ++++++ check_no_lineids.sh | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 check_code_before_sq_brackets.sh create mode 100644 check_no_lineids.sh diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 873f48c..e7b7b3a 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -8,3 +8,6 @@ pipelines: - git submodule update --init - python twincat_version_manager.py - python check_fix_white_space.py + - ./check_no_lineids.sh + - ./check_code_before_sq_brackets.sh + diff --git a/check_code_before_sq_brackets.sh b/check_code_before_sq_brackets.sh new file mode 100644 index 0000000..2d0403f --- /dev/null +++ b/check_code_before_sq_brackets.sh @@ -0,0 +1,6 @@ +#!/bin/sh +git grep '.\]\]>' *.Tc* +if test $? -ne 1; then + echo >&2 "code before double square brackets found" + exit 1 +fi diff --git a/check_no_lineids.sh b/check_no_lineids.sh new file mode 100644 index 0000000..eefb9ea --- /dev/null +++ b/check_no_lineids.sh @@ -0,0 +1,6 @@ +#!/bin/sh +git grep '&2 "LineIds found" + exit 1 +fi