# pre-commit-crocodile
<!-- markdownlint-disable no-inline-html -->
[![Build](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/badges/main/pipeline.svg)](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/-/commits/main/)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=bugs)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=code_smells)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=coverage)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=ncloc)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=alert_status)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://commitizen-tools.github.io/commitizen/)
[![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
Git hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/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](https://pre-commit.com/):** Automated Git hooks before commits and upon pushes
- **CLI - [commitizen](https://commitizen-tools.github.io/commitizen/):** Commits tools and validation based upon [conventional commits](https://www.conventionalcommits.org/en/)
- **Hooks - [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks):** Common `pre-commit` hooks useful for developers
- **Hooks - `prepare-commit-msg`:** Prepare commit message automatically based on changes
---
## Preview
![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/3.0.0/docs/preview.svg)
---
## Usage
<!-- prettier-ignore-start -->
<!-- readme-help-start -->
```yaml
usage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
[-l | -i | -c | -e | -d | -a | -C | -r] [--config FOLDER | --default] [--]
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
-C, --clean # Clean pre-commit cached hooks
-r, --run # Run pre-commit hooks
configurations arguments:
--config FOLDER # Use configurations from a specific folder
--default # Use global default configurations instead of sources
positional arguments:
-- # Positional arguments separator (recommended)
```
<!-- readme-help-stop -->
<!-- prettier-ignore-end -->
---
## Installation
```bash
{
# 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](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
```markdown title="Badge in Markdown"
[![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
```
```html title="Badge in HTML"
<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 without configurations | [![pre-commit](https://img.shields.io/badge/pre--commit-missing-gold)](https://github.com/pre-commit/pre-commit)
### Import configurations
```bash
pre-commit-crocodile --configure
```
---
## Projects with configurations | [![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
### Install dependencies
```bash
pre-commit-crocodile --install
```
### Enable hooks
```bash
pre-commit-crocodile --enable
```
### Run hooks
```bash
pre-commit-crocodile --run
```
### Update hooks
```bash
pre-commit-crocodile --autoupdate
```
### Disable hooks
```bash
pre-commit-crocodile --disable
```
### Cleanup hooks
```bash
pre-commit-crocodile --clean
```
---
## Dependencies
- [colored](https://pypi.org/project/colored/): Terminal colors and styles
- [commitizen](https://pypi.org/project/commitizen/): Simple commit conventions for internet citizens
- [pre-commit](https://pre-commit.com/): A framework for managing and maintaining pre-commit hooks
- [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile): Git hooks intended for developers using pre-commit
- [setuptools](https://pypi.org/project/setuptools/): Build and manage Python packages
- [update-checker](https://pypi.org/project/update-checker/): Check for package updates on PyPI
---
## References
- [.gitlab-ci.yml](https://docs.gitlab.com/ee/ci/yaml/): GitLab CI/CD Pipeline Configuration Reference
- [conventionalcommits](https://www.conventionalcommits.org/en/v1.0.0/): Conventional Commits specification for commit messages
- [gcil](https://pypi.org/project/gitlabci-local/): Launch .gitlab-ci.yml jobs locally
- [git-cliff](https://github.com/orhun/git-cliff): CHANGELOG generator
- [gitlab-release](https://pypi.org/project/gitlab-release/): Utility for publishing on GitLab
- [mkdocs](https://www.mkdocs.org/): Project documentation with Markdown
- [mkdocs-material](https://squidfunk.github.io/mkdocs-material/): Material theme for mkdocs documentation
- [mypy](https://pypi.org/project/mypy/): Optional static typing for Python
- [pexpect-executor](https://pypi.org/project/pexpect-executor/): Automate interactive CLI tools actions
- [PyPI](https://pypi.org/): The Python Package Index
- [termtosvg](https://pypi.org/project/termtosvg/): Record terminal sessions as SVG animations
- [twine](https://pypi.org/project/twine/): Utility for publishing on PyPI
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile",
"name": "pre-commit-crocodile",
"maintainer": null,
"docs_url": null,
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,>=3",
"maintainer_email": null,
"keywords": "git pre-commit hooks",
"author": "Adrian DC",
"author_email": "radian.dc@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/42/71/baeffbac50e19f9c029414190bfcfd117b3331435011a01740034cbc7337/pre_commit_crocodile-3.0.0.tar.gz",
"platform": null,
"description": "# pre-commit-crocodile\n\n<!-- markdownlint-disable no-inline-html -->\n\n[![Build](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/badges/main/pipeline.svg)](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/-/commits/main/)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=bugs)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=code_smells)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=coverage)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=ncloc)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=RadianDevCore_pre-commit-crocodile&metric=alert_status)](https://sonarcloud.io/dashboard?id=RadianDevCore_pre-commit-crocodile)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://commitizen-tools.github.io/commitizen/)\n[![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)\n\nGit hooks intended for developers using [pre-commit](https://pre-commit.com/) and [commitizen](https://commitizen-tools.github.io/commitizen/).\n\n**Documentation:** <https://radiandevcore.gitlab.io/tools/pre-commit-crocodile> \n**Package:** <https://pypi.org/project/pre-commit-crocodile/>\n\n---\n\n## Features\n\n**`pre-commit-crocodile` uses the following features:**\n\n- **CLI - [pre-commit](https://pre-commit.com/):** Automated Git hooks before commits and upon pushes\n- **CLI - [commitizen](https://commitizen-tools.github.io/commitizen/):** Commits tools and validation based upon [conventional commits](https://www.conventionalcommits.org/en/)\n- **Hooks - [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks):** Common `pre-commit` hooks useful for developers\n- **Hooks - `prepare-commit-msg`:** Prepare commit message automatically based on changes\n\n---\n\n## Preview\n\n![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/3.0.0/docs/preview.svg)\n\n---\n\n## Usage\n\n<!-- prettier-ignore-start -->\n<!-- readme-help-start -->\n\n```yaml\nusage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]\n [-l | -i | -c | -e | -d | -a | -C | -r] [--config FOLDER | --default] [--]\n\npre-commit-crocodile: Git hooks intended for developers using pre-commit\n\ninternal arguments:\n -h, --help # Show this help message\n --version # Show the current version\n --no-color # Disable colors outputs with 'NO_COLOR=1'\n # (or default settings: [themes] > no_color)\n --update-check # Check for newer package updates\n --settings # Show the current settings path and contents\n --set GROUP KEY VAL # Set settings specific 'VAL' value to [GROUP] > KEY\n # or unset by using 'UNSET' as 'VAL'\n\nmodes arguments:\n -l, --list # List Git hooks installed in sources\n -i, --install # Install dependencies for pre-commit hooks\n -c, --configure # Update sources with hooks configurations\n -e, --enable # Enable pre-commit hooks\n -d, --disable # Disable pre-commit hooks\n -a, --autoupdate # Autoupdate pre-commit hooks\n -C, --clean # Clean pre-commit cached hooks\n -r, --run # Run pre-commit hooks\n\nconfigurations arguments:\n --config FOLDER # Use configurations from a specific folder\n --default # Use global default configurations instead of sources\n\npositional arguments:\n -- # Positional arguments separator (recommended)\n```\n\n<!-- readme-help-stop -->\n<!-- prettier-ignore-end -->\n\n---\n\n## Installation\n\n```bash\n{\n # Option 1: If using pipx\n if type pipx >/dev/null 2>&1; then\n pipx ensurepath\n pipx install pre-commit-crocodile\n pipx upgrade pre-commit-crocodile\n\n # Option 2: If using pip\n else\n sudo pip3 install pre-commit-crocodile\n fi\n}\n```\n\n---\n\n## Compatibility\n\nProjects compatible with `pre-commit-crocodile` can use this badge to ease things for developers, both as an indicator and a documentation shortcut button :\n\n> [![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)\n\n```markdown title=\"Badge in Markdown\"\n[![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)\n```\n\n```html title=\"Badge in HTML\"\n<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>\n```\n\n---\n\n## Projects without configurations | [![pre-commit](https://img.shields.io/badge/pre--commit-missing-gold)](https://github.com/pre-commit/pre-commit)\n\n### Import configurations\n\n```bash\npre-commit-crocodile --configure\n```\n\n---\n\n## Projects with configurations | [![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)\n\n### Install dependencies\n\n```bash\npre-commit-crocodile --install\n```\n\n### Enable hooks\n\n```bash\npre-commit-crocodile --enable\n```\n\n### Run hooks\n\n```bash\npre-commit-crocodile --run\n```\n\n### Update hooks\n\n```bash\npre-commit-crocodile --autoupdate\n```\n\n### Disable hooks\n\n```bash\npre-commit-crocodile --disable\n```\n\n### Cleanup hooks\n\n```bash\npre-commit-crocodile --clean\n```\n\n---\n\n## Dependencies\n\n- [colored](https://pypi.org/project/colored/): Terminal colors and styles\n- [commitizen](https://pypi.org/project/commitizen/): Simple commit conventions for internet citizens\n- [pre-commit](https://pre-commit.com/): A framework for managing and maintaining pre-commit hooks\n- [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile): Git hooks intended for developers using pre-commit\n- [setuptools](https://pypi.org/project/setuptools/): Build and manage Python packages\n- [update-checker](https://pypi.org/project/update-checker/): Check for package updates on PyPI\n\n---\n\n## References\n\n- [.gitlab-ci.yml](https://docs.gitlab.com/ee/ci/yaml/): GitLab CI/CD Pipeline Configuration Reference\n- [conventionalcommits](https://www.conventionalcommits.org/en/v1.0.0/): Conventional Commits specification for commit messages\n- [gcil](https://pypi.org/project/gitlabci-local/): Launch .gitlab-ci.yml jobs locally\n- [git-cliff](https://github.com/orhun/git-cliff): CHANGELOG generator\n- [gitlab-release](https://pypi.org/project/gitlab-release/): Utility for publishing on GitLab\n- [mkdocs](https://www.mkdocs.org/): Project documentation with Markdown\n- [mkdocs-material](https://squidfunk.github.io/mkdocs-material/): Material theme for mkdocs documentation\n- [mypy](https://pypi.org/project/mypy/): Optional static typing for Python\n- [pexpect-executor](https://pypi.org/project/pexpect-executor/): Automate interactive CLI tools actions\n- [PyPI](https://pypi.org/): The Python Package Index\n- [termtosvg](https://pypi.org/project/termtosvg/): Record terminal sessions as SVG animations\n- [twine](https://pypi.org/project/twine/): Utility for publishing on PyPI\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Git hooks intended for developers using pre-commit",
"version": "3.0.0",
"project_urls": {
"Bug Reports": "https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/-/issues",
"Changelog": "https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/blob/main/CHANGELOG.md",
"Documentation": "https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile#pre-commit-crocodile",
"Homepage": "https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile",
"Source": "https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile",
"Statistics": "https://pypistats.org/packages/pre-commit-crocodile"
},
"split_keywords": [
"git",
"pre-commit",
"hooks"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c6ced164ebd61a3d61851560cd1a24c97d77c430d76371b438c5b182629b83c",
"md5": "7727fb22ee565cb9353b6e3ecbd8862e",
"sha256": "d2d309b4137fbb5c132723d67bf441d4072144b1fff6aac4432adcf2722380fd"
},
"downloads": -1,
"filename": "pre_commit_crocodile-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7727fb22ee565cb9353b6e3ecbd8862e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,>=3",
"size": 38418,
"upload_time": "2024-08-25T03:51:09",
"upload_time_iso_8601": "2024-08-25T03:51:09.574053Z",
"url": "https://files.pythonhosted.org/packages/2c/6c/ed164ebd61a3d61851560cd1a24c97d77c430d76371b438c5b182629b83c/pre_commit_crocodile-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4271baeffbac50e19f9c029414190bfcfd117b3331435011a01740034cbc7337",
"md5": "e2ddaad853deba139fe2e10bce556e14",
"sha256": "b61eeeed027f7d4687e8dfc56cc6f32930f09c825479522be61586eb1255b27e"
},
"downloads": -1,
"filename": "pre_commit_crocodile-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "e2ddaad853deba139fe2e10bce556e14",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,!=3.8.*,>=3",
"size": 118813,
"upload_time": "2024-08-25T03:51:11",
"upload_time_iso_8601": "2024-08-25T03:51:11.319387Z",
"url": "https://files.pythonhosted.org/packages/42/71/baeffbac50e19f9c029414190bfcfd117b3331435011a01740034cbc7337/pre_commit_crocodile-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-25 03:51:11",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "RadianDevCore",
"gitlab_project": "tools",
"lcname": "pre-commit-crocodile"
}