Skip to main content

Git hooks intended for developers using pre-commit

Project description

pre-commit-crocodile

Release Python Downloads License
Build Bugs Code Smells Coverage Lines of Code Quality Gate Status
pre-commit Commitizen friendly gcil pre-commit-crocodile guidelines

Git hooks intended for developers using pre-commit and commitizen

Documentation: https://radiandevcore.gitlab.io/tools/pre-commit-crocodile
Package: https://pypi.org/project/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

preview.svg


Usage

usage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
                            [-l | -i | -c | -b | -e | -d | -a | -C | -r] [--config FOLDER | -D] [--commit]
                            [--no-components] [--offline] [--stage STAGE] [--]

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
  -b, --badges         # Update documentation with badges configurations
  -e, --enable         # Enable pre-commit hooks
  -d, --disable        # Disable pre-commit hooks
  -a, --autoupdate     # Autoupdate pre-commit hooks
  -C, --clean          # Clean pre-commit cached hooks
  -r, --run            # Run pre-commit hooks

configurations arguments:
  --config FOLDER      # Use configurations from a specific folder
  -D, --default        # Use global default configurations instead of sources
  --commit             # Commit configurations changes automatically
  --no-components      # Import components templates locally instead of 'include: component:'
  --offline            # Use offline mode to disable configurations autoupdate
  --stage STAGE        # Run a specific pre-commit stage with --run
                       # (use 'list' to list supported stages)

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
}

Compatibility

Projects compatible with pre-commit-crocodile can use this badge to ease things for developers, both as an indicator and a documentation shortcut button :

pre-commit-crocodile

[![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
<a href="https://radiandevcore.gitlab.io/tools/pre-commit-crocodile"><img src="https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab" alt="pre-commit-crocodile" style="max-width:100%;"></a>

Projects with configurations | pre-commit-crocodile

Install dependencies (once per user)

pre-commit-crocodile --install

Enable hooks for a project

pre-commit-crocodile --enable

Manually run hooks of a project

pre-commit-crocodile --run

Disable hooks for a project

pre-commit-crocodile --disable

Projects without configurations | pre-commit

Import or refresh configurations

pre-commit-crocodile --configure

Projects maintenance | pre-commit-crocodile

Update hooks automatically

pre-commit-crocodile --autoupdate

Cleanup hooks cache

pre-commit-crocodile --clean

Dependencies


References

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-5.1.0.tar.gz (151.4 kB view details)

Uploaded Source

Built Distribution

pre_commit_crocodile-5.1.0-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

Details for the file pre_commit_crocodile-5.1.0.tar.gz.

File metadata

  • Download URL: pre_commit_crocodile-5.1.0.tar.gz
  • Upload date:
  • Size: 151.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pre_commit_crocodile-5.1.0.tar.gz
Algorithm Hash digest
SHA256 81d03b4dfea08292f79e0f3b8e99b11bcf1f0df5977d1e3610630e3e60ea94cd
MD5 7424c87708c88ec013bca50b63118d88
BLAKE2b-256 3f6241404d695df9839aea5e7e1de6ed1da6f9cbe0598fed22b38f599784fef1

See more details on using hashes here.

File details

Details for the file pre_commit_crocodile-5.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pre_commit_crocodile-5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bafe0a0b329cc1cb2d45eb4b0c8eca4f1176bc3288c97ee7c76292fc9739db1
MD5 13154fd3efab8c9e9efabb512151ab4d
BLAKE2b-256 03934a1340480ce58aa0c8b98306e2f42b6c5dfa1071a9e4a4dbb6f5daa383d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page