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 14:49:06 -08:00
parent bd3e5d86f1
commit 6beee92452

10
Jenkinsfile vendored
View File

@@ -8,16 +8,16 @@ pipeline {
// Check for spaces or mixed indentation // Check for spaces or mixed indentation
sh ''' sh '''
# Define file extensions to check # 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..." 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..." 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}" . || \ if grep -nrP "^[ ]+" --include="*.{$FILE_EXTENSIONS}" . || \
grep -nrP '^\t+ +' --include="*.{$FILE_EXTENSIONS}" .; then grep -nrP "^\t+ +" --include="*.{$FILE_EXTENSIONS}" .; then
echo "Indentation issues detected. Please fix the above lines." echo "Indentation issues detected. Please fix the above lines."
exit 1 exit 1
else else