feature/fix_linter_fuckup #4

Merged
Vulpovile merged 31 commits from feature/fix_linter_fuckup into master 2025-01-12 00:11:02 +00:00
4 changed files with 29 additions and 18 deletions
Showing only changes of commit f17e406d59 - Show all commits

22
Jenkinsfile vendored
View File

@@ -7,15 +7,23 @@ pipeline {
script { script {
// Check for spaces or mixed indentation // Check for spaces or mixed indentation
sh ''' sh '''
if grep -P "^[ ]+" -r ./**/*.css; then # Define file extensions to check
echo "Error: Files contain spaces instead of tabs for indentation." 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 exit 1
else
echo "No indentation issues detected."
exit 0
fi fi
if grep -P "^\\t+ +" -r ./**/*.css; then
echo "Error: Files contain mixed tabs and spaces for indentation."
exit 1
fi
echo "No indentation errors detected."
''' '''
} }
} }