#!/bin/bash # TimeSafari Pre-commit Hook - Debug Code Checker # Only runs on master or specified branches to catch debug code before it reaches production # Hook directory HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CONFIG_FILE="$HOOK_DIR/debug-checker.config" # Default configuration (fallback if config file is missing) DEFAULT_PROTECTED_BRANCHES=("master" "main" "production" "release") DEFAULT_DEBUG_PATTERNS=( "console\." "Debug:" "debug:" "DEBUG_" "debug_" "