From 6beee92452b21abfd193651b93cd3836d3548429 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:49:06 -0800 Subject: [PATCH] Fix jenkinsfile --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8197ab9..c4923e6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,16 +8,16 @@ pipeline { // Check for spaces or mixed indentation sh ''' # Define file extensions to check - FILE_EXTENSIONS="css|json|js|java|htm|html|cpp|c|h|p|py|go|cs" + FILE_EXTENSIONS="css,json,js,java,htm,html,cpp,c,h,p,py,go,cs" echo "Checking for spaces in indentation..." - grep -nrP '^[ ]+' --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with spaces found." + grep -nrP "^[ ]+" --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with spaces found." echo "Checking for mixed indentation..." - grep -nrP '^\t+ +' --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with mixed indentation found." + grep -nrP "^\t+ +" --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with mixed indentation found." - if grep -nrP '^[ ]+' --include="*.{$FILE_EXTENSIONS}" . || \ - grep -nrP '^\t+ +' --include="*.{$FILE_EXTENSIONS}" .; then + if grep -nrP "^[ ]+" --include="*.{$FILE_EXTENSIONS}" . || \ + grep -nrP "^\t+ +" --include="*.{$FILE_EXTENSIONS}" .; then echo "Indentation issues detected. Please fix the above lines." exit 1 else