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
5 changed files with 46 additions and 22 deletions
Showing only changes of commit accb2a9fc5 - Show all commits

View File

@@ -7,25 +7,25 @@ PROBLEMS=""
# Pass the files to grep and sed # Pass the files to grep and sed
for file in $FILES; do for file in $FILES; do
# Check for lines with spaces # Check for lines with spaces
GREP_RESULT=$(grep -nrP '^[ ]+' "$file") GREP_RESULT=$(grep -nrP '^[ ]+' "$file")
if [ -n "$GREP_RESULT" ]; then if [ -n "$GREP_RESULT" ]; then
PROBLEMS="${PROBLEMS}Space indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS PROBLEMS="${PROBLEMS}Space indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS
fi fi
# Check for lines with mixed tabs and spaces # Check for lines with mixed tabs and spaces
GREP_RESULT=$(grep -nrP '^\t+ +' "$file") GREP_RESULT=$(grep -nrP '^\t+ +' "$file")
if [ -n "$GREP_RESULT" ]; then if [ -n "$GREP_RESULT" ]; then
PROBLEMS="${PROBLEMS}Mixed indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS PROBLEMS="${PROBLEMS}Mixed indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS
fi fi
done done
# Check if there were any problems # Check if there were any problems
if [ -n "$PROBLEMS" ]; then if [ -n "$PROBLEMS" ]; then
echo "Indentation issues detected. Please fix the above lines." echo "Indentation issues detected. Please fix the above lines."
echo "$PROBLEMS" echo "$PROBLEMS"
exit 1 exit 1
else else
echo "No indentation issues detected." echo "No indentation issues detected."
exit 0 exit 0
fi fi