Skip to content

Commit

Permalink
[CI] Exclude dirs from code style check (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
PargeLenis authored Nov 23, 2023
1 parent 220eb47 commit 6463d92
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apps/ci/ci-codestyle.sh
Original file line number Diff line number Diff line change
@@ -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:"
Expand All @@ -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
Expand Down

0 comments on commit 6463d92

Please sign in to comment.