Skip to main content

Git hooks intended for developers using pre-commit

Project description

pre-commit-crocodile

Build Bugs Code Smells Coverage Lines of Code Quality Gate Status pre-commit Commitizen friendly 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

preview.svg


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

Import configurations

{
  # Disable hooks
  pre-commit-crocodile --configure
}

Projects with configurations | pre-commit-crocodile

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


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-2.0.0.tar.gz (111.1 kB view hashes)

Uploaded Source

Built Distribution

pre_commit_crocodile-2.0.0-py3-none-any.whl (32.8 kB view hashes)

Uploaded Python 3

Supported by

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