Skip to content
Snippets Groups Projects
Commit 51044d52 authored by nimrod's avatar nimrod
Browse files

fixup! A whole lot of stuff.

parent b2c2e9ab
Branches
No related tags found
No related merge requests found
Pipeline #2157 passed
......@@ -5,7 +5,6 @@
language: script
entry: ./hooks/shell-validate
types: [shell]
minimum_pre_commit_version: 0.15.0 # Because of types.
- id: ansible-syntax-check
name: Syntax check Ansible playbooks
......@@ -27,7 +26,6 @@
- id: docker-compose
name: docker-compose config
description: Validate the Docker Compose file using docker-compose config
minimum_pre_commit_version: '0.18.0'
language: python
entry: docker-compose-validate
files: docker-compose
......@@ -65,7 +63,7 @@
- id: pip-outdated
name: pip-outdated
description: Find outdated dependencies in your requirements files.
description: Find outdated Python dependencies in your requirements files.
language: python
entry: pip-outdated
args: ['--verbose']
......
......@@ -2,6 +2,12 @@
A collection of [pre-commit](https://pre-commit.com/) hooks.
## Requirements
- Supported Python 3 version (at time of writing 3.6 or later).
- [pre-commmit](https://pre-commit.com/) 2.0.0 or later.
- [Terraform](https://www.terraform.io/) (for the terraform hooks).
## Example .pre-commit-config.yaml
```yaml
......@@ -13,13 +19,53 @@ A collection of [pre-commit](https://pre-commit.com/) hooks.
- id: ansible-syntax-check
- id: ansible-vault-check
- id: docker-compose
- id: terraform-fmt # uses the installed system terraform.
- id: terraform-validate # uses the installed system terraform.
- id: terraform-fmt
- id: terraform-validate
- id: poetry-check
- id: branch-merge-conflict
- id: pip-outdated
```
## Available hooks
### `shell-validate`
Check shell scripts with `/bin/sh -en`.
### `ansible-syntax-check`
Check Ansible playbooks for syntax errors.
### `ansible-vault-check`
Verify that Ansible Vault files are vaulted.
### `docker-compose`
Validate the Docker Compose file using docker-compose config.
### `terraform-fmt`
Format Terraform files using `terraform fmt`.
Requires an installed `terraform`.
### `terraform-validate`
Validate Terraform modules using `terraform validate`.
Requires an installed `terraform`.
### `poetry-check`
Validate `pyproject.toml` files using Poetry.
### `branch-merge-conflict`
Checks for merge conflicts with a specific branch.
### `pip-outdated`
Find outdated Python dependencies in your requirements files.
## License
This software is licensed under the MIT license (see `LICENSE.txt`).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment