{"id":16781501,"url":"https://github.com/flaudisio/pre-commit-hooks","last_synced_at":"2025-10-12T16:37:53.659Z","repository":{"id":71089712,"uuid":"209825725","full_name":"flaudisio/pre-commit-hooks","owner":"flaudisio","description":"Miscellaneous hooks for pre-commit.","archived":false,"fork":false,"pushed_at":"2025-09-09T23:00:13.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T02:46:52.947Z","etag":null,"topics":["pre-commit","pre-commit-hooks"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flaudisio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-20T15:39:44.000Z","updated_at":"2025-09-09T23:00:15.000Z","dependencies_parsed_at":"2025-08-26T21:25:40.494Z","dependency_job_id":"f37eab15-ddba-423e-892b-5177a537b817","html_url":"https://github.com/flaudisio/pre-commit-hooks","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/flaudisio/pre-commit-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaudisio%2Fpre-commit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaudisio%2Fpre-commit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaudisio%2Fpre-commit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaudisio%2Fpre-commit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flaudisio","download_url":"https://codeload.github.com/flaudisio/pre-commit-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaudisio%2Fpre-commit-hooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012023,"owners_count":26085041,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["pre-commit","pre-commit-hooks"],"created_at":"2024-10-13T07:43:11.344Z","updated_at":"2025-10-12T16:37:53.654Z","avatar_url":"https://github.com/flaudisio.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pre-commit hooks\n\nMiscellaneous hooks for [pre-commit](https://pre-commit.com/).\n\n## Hooks available\n\n- `check-zero-width-spaces` - Forbid files which have one or more zero width spaces (U+200B).\n\n- `hadolint` - Run [Hadolint](https://github.com/hadolint/hadolint) on Dockerfiles.\n  - You may use any Hadolint CLI argument, e.g. [`--config example.yaml`](https://github.com/hadolint/hadolint#configure),\n    [`--ignore RULE`](https://github.com/hadolint/hadolint#rules), `--trusted-registry REGISTRY`, etc\n    See the [example](#full-example) below.\n\n- `nomad-fmt` - Run [`nomad fmt`](https://developer.hashicorp.com/nomad/commands/fmt) on Nomad manifests.\n\n- `packer-validate` - Run [`packer validate`](https://developer.hashicorp.com/packer/docs/commands/validate)\n  on JSON files.\n\n## How to install\n\n1. Install dependencies:\n   - [pre-commit](https://pre-commit.com/#install)\n   - [Hadolint](https://github.com/hadolint/hadolint/releases) (for `hadolint`)\n   - [Nomad](https://developer.hashicorp.com/nomad/install) (for `nomad-fmt`)\n   - [Packer](https://developer.hashicorp.com/packer/install) (for `packer-validate`)\n\n1. Install the pre-commit hook globally:\n\n    ```bash\n    pre-commit init-templatedir -t pre-commit ~/.git-template\n    ```\n\n1. Create the `.pre-commit-config.yaml` file:\n\n    ```bash\n    cd /path/to/my/repo/\n    vim .pre-commit-config.yaml\n    ```\n\n    **Tip:** use the example from the next section as a start point.\n\n1. Run:\n\n    ```bash\n    pre-commit run -a\n    ```\n\n## Full example\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: https://github.com/flaudisio/pre-commit-hooks\n    rev: v0.11.1\n    hooks:\n      - id: check-zero-width-spaces\n      - id: hadolint\n        args:\n          - --config .hadolint.strict.yaml\n          - --ignore DL3013\n          - --ignore DL3018\n          - --trusted-registry registry.example.com:5000\n        exclude: ^cookiecutter/.+/Dockerfile$\n      - id: packer-validate\n        files: ^templates/.+\\.json$\n```\n\n## License\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaudisio%2Fpre-commit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflaudisio%2Fpre-commit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaudisio%2Fpre-commit-hooks/lists"}