{"id":19209364,"url":"https://github.com/dmeijboom/pre-commit","last_synced_at":"2026-05-06T18:33:27.735Z","repository":{"id":129018729,"uuid":"381476773","full_name":"dmeijboom/pre-commit","owner":"dmeijboom","description":"Pre-commit","archived":false,"fork":false,"pushed_at":"2025-01-26T20:27:06.000Z","size":36,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-15T08:13:26.340Z","etag":null,"topics":["git","go","lint","pre-commit","test"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmeijboom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-06-29T19:33:25.000Z","updated_at":"2022-05-09T19:21:19.000Z","dependencies_parsed_at":"2023-08-27T21:15:11.447Z","dependency_job_id":null,"html_url":"https://github.com/dmeijboom/pre-commit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeijboom%2Fpre-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeijboom%2Fpre-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeijboom%2Fpre-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeijboom%2Fpre-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmeijboom","download_url":"https://codeload.github.com/dmeijboom/pre-commit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240281216,"owners_count":19776472,"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","go","lint","pre-commit","test"],"created_at":"2024-11-09T13:30:21.988Z","updated_at":"2026-05-06T18:33:27.708Z","avatar_url":"https://github.com/dmeijboom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pre-commit\n\n### Introduction\n\nRun checks before `git commit` so that your code doesn't suck. Note that the name `pre-commit` already exists, so I might\nchange the name of the project later on (any suggestions?).\n\n### Goals\n\n- Fast\n- Customizable\n- Easy to use\n\n## Usage\n\nCreate a file in the root of the project called `pre-commit.json` and add some checks:\n\n```json\n{\n  \"checks\": [\n    {\n      \"name\": \"Go Tests\",\n      \"cmd\": \"go test ./...\",\n      \"when\": [\n        {\n          \"glob\": \"*.go\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Configuration\n\n| Key    | Type      | Description                           |\n|--------|-----------|---------------------------------------|\n| checks | `[]Check` | A list of checks to run before commit |\n\n### Type: `Check`\n\n| Key  | Type     | Description               | Example       |\n|------|----------|---------------------------|---------------|\n| name | `string` | Display name of the check | Unittests     |\n| cmd  | `string` | Command to run            | go test ./... |\n| when | `[]When` | Conditions to test        | -             |\n\n### Type: `When`\n\nNote that all conditions are validated against the changed files in the Git staging area.\n\n| Key  | Type     | Description  | Example |\n|------|----------|--------------|---------|\n| glob | `string` | Glob pattern | `*.go`  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmeijboom%2Fpre-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmeijboom%2Fpre-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmeijboom%2Fpre-commit/lists"}