{"id":15529107,"url":"https://github.com/marcinorlowski/pre-commit-hooks","last_synced_at":"2026-04-19T14:36:12.330Z","repository":{"id":46817200,"uuid":"409675556","full_name":"MarcinOrlowski/pre-commit-hooks","owner":"MarcinOrlowski","description":"Handy Git hooks to integrate with pre-commit framework.","archived":false,"fork":false,"pushed_at":"2022-11-07T09:59:41.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T08:13:37.317Z","etag":null,"topics":["git","pre-commit","pre-commit-hooks"],"latest_commit_sha":null,"homepage":"","language":"Python","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/MarcinOrlowski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-23T16:58:51.000Z","updated_at":"2021-09-29T21:53:17.000Z","dependencies_parsed_at":"2022-08-27T19:10:36.364Z","dependency_job_id":null,"html_url":"https://github.com/MarcinOrlowski/pre-commit-hooks","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Fpre-commit-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Fpre-commit-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Fpre-commit-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Fpre-commit-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcinOrlowski","download_url":"https://codeload.github.com/MarcinOrlowski/pre-commit-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246106668,"owners_count":20724400,"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","pre-commit","pre-commit-hooks"],"created_at":"2024-10-02T11:16:21.946Z","updated_at":"2026-04-19T14:36:12.325Z","avatar_url":"https://github.com/MarcinOrlowski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![pre-commit-hooks logo](artwork/logo.png)\n\nHandy Git hooks to integrate with [pre-commit](http://pre-commit.com/) framework.\n\n---\n\n\u003c!--TOC--\u003e\n\n- [Configure pre-commit](#configure-pre-commit)\n- [Two ways to invoke pre-commit](#two-ways-to-invoke-pre-commit)\n- **Available hooks**\n  * [branch-name](docs/branch-name.md) — verifies the current Git branch name matches a required regular expression (runs at `pre-push`).\n  * [checkstyle-jar](docs/checkstyle-jar.md) — runs the Checkstyle JAR against modified Java files.\n  * [end-of-file](docs/end-of-file.md) — ensures each file is empty or ends with exactly one newline.\n  * [trailing-whitespaces](docs/trailing-whitespaces.md) — detects (and optionally strips) trailing whitespace.\n- [License](#license)\n\n\u003c!--TOC--\u003e\n\n---\n\n## Configure pre-commit\n\n**NOTE:** hooks require Python 3.\n\nAdd `.pre-commit-config.yaml` config file to in your project:\n\n```yaml\n- repo: https://github.com/MarcinOrlowski/pre-commit-hooks\n  rev: 1.0.0  # or any specific git tag\n  hooks:\n    - id: branch-name\n      stages: [ pre-push ]\n    - id: checkstyle-jar\n      # args: [ '--jar=/path/to/checkstyle.jar' ]\n    - id: end-of-file\n      # exclude_types: ['xml','png','jpeg','svg']\n      # args: [ '--fix=yes' ]\n    - id: trailing-whitespaces\n      # exclude_types: ['xml','png','jpeg','svg']\n      # args: [ '--fix=no' ]\n```\n\n---\n\n## Two ways to invoke pre-commit\n\nIf you want to invoke the checks as a git pre-commit hook, run:\n\n```bash\n$ pre-commit install\n```\n\nIf you want to run the checks on-demand (outside of git hooks), run:\n\n```bash\n$ pre-commit run --all-files --verbose\n```\n\nTo try your hooks with all the files present.\n\n\u003e **NOTE:** This will apply your hooks too **ALL** the files, which\n\u003e in case of using modifying hooks might not what you really want!\n\n## License ##\n\n* Written and copyrighted \u0026copy;2021-2026 by Marcin Orlowski \u003cmail (#) marcinorlowski (.) com\u003e\n* This is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcinorlowski%2Fpre-commit-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcinorlowski%2Fpre-commit-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcinorlowski%2Fpre-commit-hooks/lists"}