{"id":22745661,"url":"https://github.com/hadenlabs/pre-commit-hooks","last_synced_at":"2025-06-21T05:36:11.746Z","repository":{"id":43932077,"uuid":"353482306","full_name":"hadenlabs/pre-commit-hooks","owner":"hadenlabs","description":"Pre commit hooks","archived":false,"fork":false,"pushed_at":"2022-07-18T17:16:38.000Z","size":466,"stargazers_count":3,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-21T10:56:09.666Z","etag":null,"topics":["git","hadenlabs","iac","peru","pre-commit","pre-commit-hook","python"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hadenlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"docs/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null},"funding":{"github":["hadenlabs"],"patreon":null,"open_collective":null,"ko_fi":"luismayta","tidelift":null,"community_bridge":null,"liberapay":"luismayta","issuehunt":null,"otechie":null,"custom":["https://www.paypal.me/luismayta","https://www.buymeacoffee.com/luismayta"]}},"created_at":"2021-03-31T20:30:58.000Z","updated_at":"2021-11-02T12:40:01.000Z","dependencies_parsed_at":"2022-09-24T21:42:31.419Z","dependency_job_id":null,"html_url":"https://github.com/hadenlabs/pre-commit-hooks","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hadenlabs/pre-commit-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadenlabs%2Fpre-commit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadenlabs%2Fpre-commit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadenlabs%2Fpre-commit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadenlabs%2Fpre-commit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadenlabs","download_url":"https://codeload.github.com/hadenlabs/pre-commit-hooks/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadenlabs%2Fpre-commit-hooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261070524,"owners_count":23105421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","hadenlabs","iac","peru","pre-commit","pre-commit-hook","python"],"created_at":"2024-12-11T02:07:38.129Z","updated_at":"2025-06-21T05:36:06.723Z","avatar_url":"https://github.com/hadenlabs.png","language":"Go","funding_links":["https://github.com/sponsors/hadenlabs","https://ko-fi.com/luismayta","https://liberapay.com/luismayta","https://www.paypal.me/luismayta","https://www.buymeacoffee.com/luismayta"],"categories":[],"sub_categories":[],"readme":"\u003c!--\n\n\n  ** DO NOT EDIT THIS FILE\n  **\n  ** 1) Make all changes to `provision/generator/README.yaml`\n  ** 2) Run`task readme` to rebuild this file.\n  **\n  ** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)\n  **\n\n\n  --\u003e\n\n[![Latest Release](https://img.shields.io/github/release/hadenlabs/pre-commit-hooks)](https://github.com/hadenlabs/pre-commit-hooks/releases) [![Lint](https://img.shields.io/github/workflow/status/hadenlabs/pre-commit-hooks/lint-code)](https://github.com/hadenlabs/pre-commit-hooks/actions?workflow=lint-code) [![Test](https://img.shields.io/github/workflow/status/hadenlabs/pre-commit-hooks/test)](https://github.com/hadenlabs/pre-commit-hooks/actions?workflow=test) [![CD](https://img.shields.io/github/workflow/status/hadenlabs/pre-commit-hooks/cd)](https://github.com/hadenlabs/pre-commit-hooks/actions?workflow=cd) [![Best Practices](https://bestpractices.coreinfrastructure.org/projects/5156/badge)](https://bestpractices.coreinfrastructure.org/projects/5156) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow)](https://conventionalcommits.org) [![KeepAChangelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog%20v1.0.0-orange)](https://keepachangelog.com)\n\n# pre-commit-hooks\n\nThis repository is a collection of Git hooks to be used with the [pre-commit](https://pre-commit.com/) framework.\n\n## Features\n\n- [Terraform](https://github.com/terraform-linters/tflint)\n- [Go](https://golang.org)\n- [Markdown](https://github.com/tcort/markdown-link-check)\n- [Shellcheck](https://github.com/koalaman/shellcheck)\n- [Hadolint](https://github.com/hadolint/hadolint)\n\n## TODO\n\n- [chore: implement hook gnu make](https://github.com/hadenlabs/pre-commit-hooks/issues/2)\n\n## Installation\n\n### Base\n\n1. Install [pre-commit](https://pre-commit.com/). E.g. `brew install pre-commit`\n\n### MacOS\n\n1. Install [Terraform](https://www.terraform.io/), [TFLint](https://github.com/terraform-linters/tflint), [Go](https://golang.org/), [markdown-link-check](https://github.com/tcort/markdown-link-check), [shellcheck](https://github.com/koalaman/shellcheck). E.g\n\n```shell script\n  brew install terraform \\\n      tflint \\\n      go \\\n      golangci/tap/golangci-lint \\\n      shellcheck \u0026\u0026 \\\n      yarn global add markdown-link-check\n```\n\n### Linux\n\n## Usage\n\n# How to use this project\n\n## Examples\n\n### Example: Run All Hooks\n\n```shell script\npre-commit run --all-files\n```\n\n### Example: Run A Specific Hook\n\n```shell script\npre-commit run terraform-validate --all-files\n```\n\n### terraform:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: terraform-fmt\n      - id: terraform-validate\n      - id: terraform-docs\n        args:\n          - '--output-file=docs/include/terraform.md'\n          - '--output-mode=replace'\n          - '--sort-by-type'\n      - id: terraform-docs-replace\n      - id: terraform-tflint\n      - id: terraform-tfsec\n      - id: checkov\n```\n\n### terragrunt:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: terragrunt-fmt\n      - id: terraform-validate\n```\n\n### markdown:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: markdown-link-check\n        args:\n          - '--config=markdown-config.json'\n```\n\n### shell:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: shellcheck\n```\n\n### Go:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: go-fmt\n      - id: go-imports\n      - id: go-vet\n      - id: golint\n      - id: gocyclo\n      - id: validate-toml\n      - id: no-go-testing\n      - id: golangci-lint\n      - id: go-critic\n      - id: go-unit-tests\n      - id: go-build\n      - id: go-mod-tidy\n      - id: go-mod-vendor\n```\n\n### check:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: todocheck\n```\n\n### grep:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: do-not-commit\n```\n\n### docker:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: hadolint\n        args:\n          - --config=.ci/linters/.hadolint.yaml\n```\n\n### docker-compose:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: docker-compose-check\n```\n\n### gitleaks:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: gitleaks\n        args:\n          - --path=.\n          - --repo-config-path=.ci/linters/.gitleaks.toml\n          - --verbose\n```\n\n### prepare-commit-msg:\n\n```yaml\nrepos:\n  - repo: https://github.com/hadenlabs/pre-commit-hooks\n    rev: 0.4.0\n    hooks:\n      - id: prepare-commit-msg\n        stages: [prepare-commit-msg]\n```\n\n## Help\n\n**Got a question?**\n\nFile a GitHub [issue](https://github.com/hadenlabs/pre-commit-hooks/issues).\n\n## Contributing\n\nSee [Contributing](./docs/contributing.md).\n\n## Module Versioning\n\nThis Module follows the principles of [Semantic Versioning (SemVer)](https://semver.org/).\n\nUsing the given version number of `MAJOR.MINOR.PATCH`, we apply the following constructs:\n\n1. Use the `MAJOR` version for incompatible changes.\n1. Use the `MINOR` version when adding functionality in a backwards compatible manner.\n1. Use the `PATCH` version when introducing backwards compatible bug fixes.\n\n### Backwards compatibility in `0.0.z` and `0.y.z` version\n\n- In the context of initial development, backwards compatibility in versions `0.0.z` is **not guaranteed** when `z` is increased. (Initial development)\n- In the context of pre-release, backwards compatibility in versions `0.y.z` is **not guaranteed** when `y` is increased. (Pre-release)\n\n## Copyright\n\nCopyright © 2018-2022 [Hadenlabs](https://hadenlabs.com)\n\n## Trademarks\n\nAll other trademarks referenced herein are the property of their respective owners.\n\n## License\n\nThe code and styles are licensed under the LGPL-3.0 license [See project license.](LICENSE).\n\n## Don't forget to 🌟 Star 🌟 the repo if you like pre-commit-hooks\n\n[Your feedback is appreciated](https://github.com/hadenlabs/pre-commit-hooks/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadenlabs%2Fpre-commit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadenlabs%2Fpre-commit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadenlabs%2Fpre-commit-hooks/lists"}