From 6463d92329dda42c5c643b95279a269c26bf8c97 Mon Sep 17 00:00:00 2001 From: PargeLenis <63361456+PargeLenis@users.noreply.github.com> Date: Thu, 23 Nov 2023 23:56:55 +0100 Subject: [PATCH] [CI] Exclude dirs from code style check (#80) --- apps/ci/ci-codestyle.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/ci/ci-codestyle.sh b/apps/ci/ci-codestyle.sh index ca9deab3a9..9a4df7d840 100644 --- a/apps/ci/ci-codestyle.sh +++ b/apps/ci/ci-codestyle.sh @@ -1,5 +1,16 @@ #!/bin/bash +# exclude external libraries from code style check +exclude=( + # dirs + "Eluna" +) + +exclude_dirs="" +for dir in "${exclude[@]}"; do + exclude_dirs+="--exclude-dir=$dir " +done + set -e echo "Starting Codestyling Script:" @@ -13,7 +24,7 @@ declare -A singleLineRegexChecks=( for check in ${!singleLineRegexChecks[@]}; do echo " Checking RegEx: '${check}'" - if grep -P -r -I -n ${check} src; then + if grep -P -r -I -n $exclude_dirs ${check} src; then echo echo "${singleLineRegexChecks[$check]}" exit 1