Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pre-commit-hooks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
pre-commit-hooks
Commits
51044d52
Commit
51044d52
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
fixup! A whole lot of stuff.
parent
b2c2e9ab
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2157
passed
3 years ago
Stage: .pre
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.pre-commit-hooks.yaml
+1
-3
1 addition, 3 deletions
.pre-commit-hooks.yaml
README.md
+48
-2
48 additions, 2 deletions
README.md
with
49 additions
and
5 deletions
.pre-commit-hooks.yaml
+
1
−
3
View file @
51044d52
...
...
@@ -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'
]
...
...
This diff is collapsed.
Click to expand it.
README.md
+
48
−
2
View file @
51044d52
...
...
@@ -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`).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment