Fix jenkinsfile
All checks were successful
Flare Microsystems Git/FlarePublic/gitea-themes/pipeline/pr-master This commit looks good

This commit is contained in:
Vulpovile
2025-01-11 15:22:11 -08:00
parent cdc63f6fcd
commit 6748e21345

6
Jenkinsfile vendored
View File

@@ -18,15 +18,15 @@ pipeline {
echo "$FILES" | while IFS= read -r file; do echo "$FILES" | while IFS= read -r file; do
# Check for lines with spaces # Check for lines with spaces
GREP_RESULT=$(grep -nrP '^[ ]+' "$file" | sed 's/\([^:]*\):\([^:]*\):\([ ]*\).*/File: \1, Line: \2, Found: \3/') GREP_RESULT=$(grep -nrP '^[ ]+' "$file" | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/')
if [ -n "$GREP_RESULT" ]; then if [ -n "$GREP_RESULT" ]; then
PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS
fi fi
# Check for lines with mixed tabs and spaces # Check for lines with mixed tabs and spaces
GREP_RESULT=$(grep -nrP '^\t+ +' "$file" | sed 's/\([^:]*\):\([^:]*\):\([ ]*\).*/File: \1, Line: \2, Found: \3/') GREP_RESULT=$(grep -nrP '^\\t+ +' "$file" | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/')
if [ -n "$GREP_RESULT" ]; then if [ -n "$GREP_RESULT" ]; then
PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS PROBLEMS="$PROBLEMS$GREP_RESULT"$'\\n' # Append the result to PROBLEMS
fi fi
done done