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 33 additions and 20 deletions
Showing only changes of commit b225f3d1e2 - Show all commits

7
Jenkinsfile vendored
View File

@@ -9,13 +9,14 @@ pipeline {
sh ''' sh '''
FILE_EXTENSIONS="css json js java py ps1 cs cmd bat htm html cpp c h hpp" 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/^/*.*/') # Convert FILE_EXTENSIONS to --include pattern
INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*./g; s/^/*./')
echo "Checking for lines starting with spaces in $FILE_EXTENSIONS files..." echo "Checking for lines starting with spaces in $FILE_EXTENSIONS files..."
grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || echo "No lines with spaces found." grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with spaces found."
echo "Checking for lines with mixed tabs and spaces in $FILE_EXTENSIONS files..." 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." grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\(\\t* +\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with mixed indentation found."
if grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || \ if grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || \
grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" .; then grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" .; then