Files
dotfiles/common/.config/templates/pre-commit
Pratik Tripathy 2e8f827135 refactor(templates): Better template file organization
- .prettierignore & .dockerignore: generate from the repository's
  .gitignore file
- .dockerignore: Ignore .git, *.md, Dockerfile by default
- Remove unnecessary exports for each template
- .gitignore: Better comments and organization
2025-10-28 21:36:59 +05:30

19 lines
499 B
Bash
Executable File

#!/bin/sh
# Check if Gitleaks is installed
if ! command -v gitleaks >/dev/null 2>&1; then
echo "Gitleaks is not installed. Skipping leak check."
echo "Please install Gitleaks for enhanced security."
exit 0
fi
# Run Gitleaks & check the exit code
if ! gitleaks protect --staged -v; then
echo "Gitleaks has detected potential secrets in your changes."
echo "Please remove any sensitive information before committing."
exit 1
fi
# If Gitleaks passes, allow the commit
exit 0