Git hooks intended for developers using pre-commit
Project description
pre-commit-crocodile
Git hooks intended for developers using pre-commit.
Documentation: https://radiandevcore.gitlab.io/tools/pre-commit-crocodile
Features
pre-commit-crocodile
uses the following features:
- CLI - pre-commit: Automated Git hooks before commits and upon pushes
- CLI - commitizen: Commits tools and validation based upon conventional commits
- Hooks - pre-commit-hooks: Common
pre-commit
hooks useful for developers - Hooks -
prepare-commit-msg
: Prepare commit message automatically based on changes
Preview
Usage
usage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
[-l | -i | -c | -e | -d | -a | -r] [--]
pre-commit-crocodile: Git hooks intended for developers using pre-commit
internal arguments:
-h, --help # Show this help message
--version # Show the current version
--no-color # Disable colors outputs with 'NO_COLOR=1'
# (or default settings: [themes] > no_color)
--update-check # Check for newer package updates
--settings # Show the current settings path and contents
--set GROUP KEY VAL # Set settings specific 'VAL' value to [GROUP] > KEY
# or unset by using 'UNSET' as 'VAL'
modes arguments:
-l, --list # List Git hooks installed in sources
-i, --install # Install dependencies for pre-commit hooks
-c, --configure # Update sources with hooks configurations
-e, --enable # Enable pre-commit hooks
-d, --disable # Disable pre-commit hooks
-a, --autoupdate # Autoupdate pre-commit hooks
-r, --run # Run pre-commit hooks
positional arguments:
-- # Positional arguments separator (recommended)
Installation
{
# Option 1: If using pipx
if type pipx >/dev/null 2>&1; then
pipx ensurepath
pipx install pre-commit-crocodile
pipx upgrade pre-commit-crocodile
# Option 2: If using pip
else
sudo pip3 install pre-commit-crocodile
fi
}
Projects without configurations | ![pre-commit](https://pypi-camo.freetls.fastly.net/cee8f3b2f7f0430b89224bf4d92764f4aeeb901d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7072652d2d636f6d6d69742d6d697373696e672d676f6c64)
Import configurations
{
# Disable hooks
pre-commit-crocodile --configure
}
Projects with configurations | ![pre-commit-crocodile](https://pypi-camo.freetls.fastly.net/535924bc7c15e88fe1e6e29c06f3501f17a3ab87/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7072652d2d636f6d6d69742d2d63726f636f64696c652d656e61626c65642d627269676874677265656e3f6c6f676f3d6769746c6162)
Install dependencies
{
# Install dependencies
pre-commit-crocodile --install
}
Enable hooks
{
# Enable hooks
pre-commit-crocodile --enable
}
Run hooks
{
# Manually run hooks
pre-commit-crocodile --run
}
Update hooks
{
# Autoupdate hooks
pre-commit-crocodile --autoupdate
}
Disable hooks
{
# Disable hooks
pre-commit-crocodile --disable
}
Dependencies
- colored: Terminal colors and styles
- commitizen: Simple commit conventions for internet citizens
- pre-commit: A framework for managing and maintaining pre-commit hooks
- pre-commit-crocodile: Git hooks intended for developers using pre-commit
- setuptools: Build and manage Python packages
- update-checker: Check for package updates on PyPI
References
- .gitlab-ci.yml: GitLab CI/CD Pipeline Configuration Reference
- conventionalcommits: Conventional Commits specification for commit messages
- gcil: Launch .gitlab-ci.yml jobs locally
- git-cliff: CHANGELOG generator
- gitlab-release: Utility for publishing on GitLab
- mypy: Optional static typing for Python
- pexpect-executor: Automate interactive CLI tools actions
- PyPI: The Python Package Index
- termtosvg: Record terminal sessions as SVG animations
- twine: Utility for publishing on PyPI
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pre_commit_crocodile-2.0.0.tar.gz
(111.1 kB
view hashes)
Built Distribution
Close
Hashes for pre_commit_crocodile-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4475f2e3ac1aa43bfdb329f161739d00ef035eb935a7cd43f6569d0e8386cc0 |
|
MD5 | 0bbc25f42c0ecc4e7e803c1f1d09f8df |
|
BLAKE2b-256 | 2b2edc448870a084b92956779363a8eee7f52e9631ff5527299bf16f0091c61e |
Close
Hashes for pre_commit_crocodile-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7f30e83adffd6c9a4fb8ace84008fb33f08af0de2115db4484f654bd1a24062 |
|
MD5 | 42f6c8aeef79699d9c4c929870446fe2 |
|
BLAKE2b-256 | 7b9dfb3aba80a3c28b40c0b89dbcd34e4cdc96e209328be314ff105db6aebde7 |