All checks were successful
Flare Microsystems Git/FlarePublic/gitea-themes/pipeline/pr-master This commit looks good
45 lines
1.4 KiB
Groovy
45 lines
1.4 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('Check Indentation') {
|
|
steps {
|
|
script {
|
|
// Check for spaces or mixed indentation
|
|
sh '''
|
|
FILE_EXTENSIONS="css json js java py ps1 cs cmd bat htm html cpp c h hpp"
|
|
|
|
INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*.*/g; s/^/*.*/')
|
|
|
|
echo "Checking for lines starting with spaces in $FILE_EXTENSIONS files..."
|
|
grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || echo "No lines with spaces found."
|
|
|
|
echo "Checking for lines with mixed tabs and spaces in $FILE_EXTENSIONS files..."
|
|
grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . || echo "No lines with mixed indentation found."
|
|
|
|
if grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || \
|
|
grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" .; 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'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|