{"id":15570761,"url":"https://github.com/keith/pre-commit-buildifier","last_synced_at":"2026-04-03T00:03:50.465Z","repository":{"id":44513083,"uuid":"371860304","full_name":"keith/pre-commit-buildifier","owner":"keith","description":"Fix \u0026 Lint starlark code with buildifier and pre-commit","archived":false,"fork":false,"pushed_at":"2026-02-10T18:51:45.000Z","size":39,"stargazers_count":23,"open_issues_count":1,"forks_count":15,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-25T22:22:27.479Z","etag":null,"topics":["bazel","pre-commit"],"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/keith.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":"2021-05-29T02:11:31.000Z","updated_at":"2026-02-21T21:05:33.000Z","dependencies_parsed_at":"2023-02-10T08:03:14.533Z","dependency_job_id":"90322d6a-f6bf-462c-bf11-c9c3ff0610ad","html_url":"https://github.com/keith/pre-commit-buildifier","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/keith/pre-commit-buildifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fpre-commit-buildifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fpre-commit-buildifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fpre-commit-buildifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fpre-commit-buildifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keith","download_url":"https://codeload.github.com/keith/pre-commit-buildifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fpre-commit-buildifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30521652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T19:51:21.629Z","status":"ssl_error","status_checked_at":"2026-03-14T19:51:12.959Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bazel","pre-commit"],"created_at":"2024-10-02T17:43:47.512Z","updated_at":"2026-03-14T23:44:16.188Z","avatar_url":"https://github.com/keith.png","language":"Shell","readme":"# pre-commit-buildifier\n\nThis is a hook for [pre-commit][pc] and [buildifier][buildifier] that\ndoesn't require it to be installed ahead of time and easily lets you pin\nto a specific version.\n\n## Usage\n\n```yaml\n-   repo: https://github.com/keith/pre-commit-buildifier\n    rev: TAG OR SHA\n    hooks:\n    -   id: buildifier\n    -   id: buildifier-lint\n```\n\nThis repo provides multiple hooks because some buildifier rules cannot\nbe autofixed. The `buildifier` hook fixes everything that can while the\n`buildifier-lint` hook prints unfixable warnings. If you use both of\nthem you should use them in that order so you don't end up in duplicate\nwarnings.\n\nIf you'd like to pass custom flags to buildifier (as well as the default\nmode configurations) you can use pre-commit's `args`:\n\n```yaml\n    -   id: buildifier\n        args: [custom, flags]\n```\n\n## Custom Download URL\n\nIf you need to download buildifier from a custom URL (e.g., an internal\nmirror or artifact server), you can use the `--buildifier-base-url`\nargument:\n\n```yaml\n-   repo: https://github.com/keith/pre-commit-buildifier\n    rev: TAG OR SHA\n    hooks:\n    -   id: buildifier\n        args: [--buildifier-base-url=https://my-internal-mirror.example.com/buildifier/v8.2.1]\n    -   id: buildifier-lint\n        args: [--buildifier-base-url=https://my-internal-mirror.example.com/buildifier/v8.2.1]\n```\n\nThe script will append the appropriate filename (e.g.,\n`buildifier-linux-amd64`) to this base URL.\n\n[buildifier]: https://github.com/bazelbuild/buildtools/tree/master/buildifier\n[pc]: https://pre-commit.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fpre-commit-buildifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeith%2Fpre-commit-buildifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fpre-commit-buildifier/lists"}