All checks were successful
Flare Microsystems Git/FlarePublic/gitea-themes/pipeline/pr-master This commit looks good
44 lines
1.3 KiB
Groovy
44 lines
1.3 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('Check Indentation') {
|
|
steps {
|
|
script {
|
|
// 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"
|
|
|
|
echo "Checking for spaces in indentation..."
|
|
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."
|
|
|
|
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
|
|
echo "No indentation issues detected."
|
|
exit 0
|
|
fi
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
stage('Validate CSS Syntax') {
|
|
steps {
|
|
script {
|
|
sh 'stylelint ./**/*.css'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|