{"id":19615939,"url":"https://github.com/bahjat/pre-commit-golang","last_synced_at":"2025-04-09T16:04:16.954Z","repository":{"id":38195079,"uuid":"200255008","full_name":"Bahjat/pre-commit-golang","owner":"Bahjat","description":"Golang pre-commit hooks for http://pre-commit.com/","archived":false,"fork":false,"pushed_at":"2025-03-13T17:17:45.000Z","size":21,"stargazers_count":67,"open_issues_count":6,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T16:04:05.145Z","etag":null,"topics":["go","pre-commit","precommit-hooks","shell"],"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/Bahjat.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}},"created_at":"2019-08-02T15:08:17.000Z","updated_at":"2025-03-13T17:23:00.000Z","dependencies_parsed_at":"2024-06-18T22:48:14.151Z","dependency_job_id":"87b34360-dafd-489d-a77f-180a563a6d5e","html_url":"https://github.com/Bahjat/pre-commit-golang","commit_stats":{"total_commits":21,"total_committers":5,"mean_commits":4.2,"dds":"0.19047619047619047","last_synced_commit":"bdba95f94147c2f5da7eda81e15cdd92c41758ba"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bahjat%2Fpre-commit-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bahjat%2Fpre-commit-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bahjat%2Fpre-commit-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bahjat%2Fpre-commit-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bahjat","download_url":"https://codeload.github.com/Bahjat/pre-commit-golang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065289,"owners_count":21041871,"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":["go","pre-commit","precommit-hooks","shell"],"created_at":"2024-11-11T10:59:14.397Z","updated_at":"2025-04-09T16:04:16.927Z","avatar_url":"https://github.com/Bahjat.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pre-commit-golang\n\nGolang pre-commit hooks for [pre-commit.com](http://pre-commit.com/)\n\n## Installation\n\nYou first need to install [pre-commit](https://pre-commit.com/#install):\n\n```bash\nbrew install pre-commit\n```\n\nThen install pre-commit in your Git repository:\n\n```bash\npre-commit install\n```\n\n## Usage\n\nAdd a file named `.pre-commit-config.yaml` to the root directory of your repository:\n\n```yaml\nrepos:\n  - repo: https://github.com/Bahjat/pre-commit-golang\n    rev: v1.0.5\n    hooks:\n      - id: go-fmt-import\n      - id: go-vet\n      - id: go-lint\n      - id: go-unit-tests\n      - id: gofumpt # requires github.com/mvdan/gofumpt\n      - id: go-err-check # requires github.com/kisielk/errcheck\n      - id: go-static-check # install https://staticcheck.io/docs/\n      - id: golangci-lint # requires github.com/golangci/golangci-lint\n        args: [--config=.github/linters/.golangci.yml] # optional\n      - id: go-ruleguard # requires https://github.com/quasilyte/go-ruleguard\n        args: [rules/rules.go]\n      - id: go-imports-reviser # requires https://github.com/incu6us/goimports-reviser\n```\n\n## Contributing\n\n- Fork it\n- Create your feature branch: `git checkout -b my-new-feature`\n- Commit your changes: `git commit -am 'Add some feature'`\n- Push to the branch: `git push origin my-new-feature`\n- Create a new Pull Request\n\n## Credits\n\nThis repository is inspired by [dnephin/pre-commit-golang](https://github.com/dnephin/pre-commit-golang).\n\n## Finally\n\nIf you like these hooks, please give this repository a star!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahjat%2Fpre-commit-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahjat%2Fpre-commit-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahjat%2Fpre-commit-golang/lists"}