refactor: remove all inline comments from code

This commit is contained in:
2026-04-25 18:57:05 +03:00
parent bc1b914476
commit c85e981dc5
9 changed files with 2 additions and 144 deletions

View File

@@ -1,12 +1,9 @@
#!/bin/bash
# Pre-commit hook: Validate commit message and check for cache files
set -e
# Get commit message file
COMMIT_MSG_FILE="$1"
if [ -z "$COMMIT_MSG_FILE" ]; then
# If called without args, check staged changes for cache files
echo "Checking for cache files in staged changes..."
CACHE_FILES=$(git diff --cached --name-only | grep -E "__pycache__|\.pyc$|\.pyo$" || true)
@@ -26,10 +23,8 @@ if [ -z "$COMMIT_MSG_FILE" ]; then
exit 0
fi
# Validate commit message format
COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
# Pattern: type: lowercase description (max 50 chars, no period)
if ! echo "$COMMIT_MSG" | grep -qE "^(feat|fix|docs|style|refactor|test|chore): [a-z].{0,49}$"; then
echo "❌ Invalid commit message format!"
echo ""
@@ -60,7 +55,6 @@ if ! echo "$COMMIT_MSG" | grep -qE "^(feat|fix|docs|style|refactor|test|chore):
exit 1
fi
# Check for period at end
if echo "$COMMIT_MSG" | grep -qE "\.$"; then
echo "❌ Commit message should not end with a period"
exit 1