{"id":16931115,"url":"https://github.com/dnephin/pre-commit-golang","last_synced_at":"2025-04-12T15:41:44.895Z","repository":{"id":37735342,"uuid":"43038698","full_name":"dnephin/pre-commit-golang","owner":"dnephin","description":"Golang hooks for pre-commit","archived":false,"fork":false,"pushed_at":"2023-08-03T17:10:38.000Z","size":58,"stargazers_count":659,"open_issues_count":32,"forks_count":222,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-14T20:43:40.658Z","etag":null,"topics":["git","hooks","pre-commit","precommit-hooks"],"latest_commit_sha":null,"homepage":null,"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/dnephin.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":"2015-09-24T02:02:06.000Z","updated_at":"2024-10-13T15:53:45.000Z","dependencies_parsed_at":"2024-10-25T18:44:49.386Z","dependency_job_id":"bdc92445-4b57-4032-97ac-48004326c22a","html_url":"https://github.com/dnephin/pre-commit-golang","commit_stats":{"total_commits":58,"total_committers":36,"mean_commits":"1.6111111111111112","dds":0.7586206896551724,"last_synced_commit":"c17f835cf9f04b8b5ed1c1f7757cedc6728d8a21"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnephin%2Fpre-commit-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnephin%2Fpre-commit-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnephin%2Fpre-commit-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnephin%2Fpre-commit-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnephin","download_url":"https://codeload.github.com/dnephin/pre-commit-golang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590871,"owners_count":21129904,"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","hooks","pre-commit","precommit-hooks"],"created_at":"2024-10-13T20:43:15.435Z","updated_at":"2025-04-12T15:41:44.875Z","avatar_url":"https://github.com/dnephin.png","language":"Shell","readme":"pre-commit-golang\n=================\n\n:rotating_light: Please see the project sunsetting announcement:\n[Issues/98](https://github.com/dnephin/pre-commit-golang/issues/98)\n:rotating_light:\n\n----\n\ngolang hooks for http://pre-commit.com/\n\n### Using these hooks\n\nAdd this to your `.pre-commit-config.yaml`\n\n    - repo: https://github.com/dnephin/pre-commit-golang\n      rev: master\n      hooks:\n        - id: go-fmt\n        - id: go-vet\n        - id: go-lint\n        - id: go-imports\n        - id: go-cyclo\n          args: [-over=15]\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\n### Available hooks\n\n- `go-fmt` - Runs `gofmt`, requires golang\n- `go-vet` - Runs `go vet`, requires golang\n- `go-lint` - Runs `golint`, requires https://github.com/golang/lint but is unmaintained \u0026 deprecated in favour of [`golangci-lint`](https://github.com/golangci/golangci-lint)\n- `go-imports` - Runs `goimports`, requires golang.org/x/tools/cmd/goimports\n- `go-cyclo` - Runs `gocyclo`, require https://github.com/fzipp/gocyclo\n- `validate-toml` - Runs `tomlv`, requires\n   https://github.com/BurntSushi/toml/tree/master/cmd/tomlv\n- `no-go-testing` - Checks that no files are using `testing.T`, if you want\n  developers to use a different testing framework\n- `golangci-lint` - run `golangci-lint run ./...`, requires\n  [golangci-lint](https://github.com/golangci/golangci-lint)\n- `go-critic` - run `gocritic check ./...`, requires [go-critic](https://github.com/go-critic/go-critic)\n- `go-unit-tests` - run `go test -tags=unit -timeout 30s -short -v`\n- `go-build` - run `go build`, requires golang\n- `go-mod-tidy` - run `go mod tidy -v`, requires golang\n- `go-mod-vendor` - run `go mod vendor`, requires golang\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnephin%2Fpre-commit-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnephin%2Fpre-commit-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnephin%2Fpre-commit-golang/lists"}