From 6748e21345454aaa7cbe558d53eb38b5087ed1d3 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:22:11 -0800 Subject: [PATCH] Fix jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6569979..81560fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,15 +18,15 @@ pipeline { echo "$FILES" | while IFS= read -r file; do # 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 PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS fi # 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 - PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS + PROBLEMS="$PROBLEMS$GREP_RESULT"$'\\n' # Append the result to PROBLEMS fi done