| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A collection of pre-commit hooks for various languages and tools to ensure code quality, security, and consistency.
Add this to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/aRustyDev/pre-commit-hooks
rev: v0.1.0 # Use the latest release
hooks:
- id: shellcheck
- id: shfmt
# Add more hooks as neededThen run:
pre-commit install
pre-commit run --all-filesnpm install --save-dev @arustydev/pre-commit-hookspip install arustydev-pre-commit-hookscurl -sSL https://github.com/aRustyDev/pre-commit-hooks/releases/latest/download/install.sh | bash# .pre-commit-config.yaml
repos:
- repo: https://github.com/aRustyDev/pre-commit-hooks
rev: v0.1.0
hooks:
# Shell scripts
- id: shellcheck
args: [-x]
- id: shfmt
args: [-i, '2', -ci]
# JavaScript
- id: eslint
files: \.js$
# Commits
- id: commitlint
stages: [commit-msg]# .pre-commit-config.yaml
repos:
- repo: https://github.com/aRustyDev/pre-commit-hooks
rev: v0.1.0
hooks:
# Run on specific files
- id: nix-fmt
files: \.nix$
# Custom arguments
- id: shellcheck
args: [--severity=warning]
# Exclude patterns
- id: eslint
exclude: ^vendor/# Clone the repository
git clone https://github.com/aRustyDev/pre-commit-hooks.git
cd pre-commit-hooks
# Install dependencies
npm install
pip install -e .[dev]
pre-commit install
# Run tests
./tests/run_tests.shSee CONTRIBUTING.md for guidelines.
Tests are written using bats:
# Run all tests
./tests/run_tests.sh
# Run specific test
bats tests/commits/test_gitlint.bats
# Run with coverage
kcov coverage bats tests/This project follows Semantic Versioning. See CHANGELOG.md for release history.
MIT License - see LICENSE file for details.
| Back | FazBrowse Home | New Git URL |