{"id":19019880,"url":"https://github.com/shini4i/pre-commit-makefile","last_synced_at":"2026-01-29T22:02:16.345Z","repository":{"id":196099455,"uuid":"694339663","full_name":"shini4i/pre-commit-makefile","owner":"shini4i","description":"pre-commit hook to update README with Makefile targets description","archived":false,"fork":false,"pushed_at":"2024-12-05T19:34:34.000Z","size":50,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T18:47:25.034Z","etag":null,"topics":["makefile","pre-commit","pre-commit-hooks"],"latest_commit_sha":null,"homepage":"","language":"Go","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/shini4i.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":"2023-09-20T19:55:28.000Z","updated_at":"2024-12-05T16:38:57.000Z","dependencies_parsed_at":"2023-09-21T10:26:11.873Z","dependency_job_id":"883f918a-e5f2-4cde-bf5b-d0ed0e2596ed","html_url":"https://github.com/shini4i/pre-commit-makefile","commit_stats":null,"previous_names":["shini4i/pre-commit-makefile"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/shini4i/pre-commit-makefile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fpre-commit-makefile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fpre-commit-makefile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fpre-commit-makefile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fpre-commit-makefile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shini4i","download_url":"https://codeload.github.com/shini4i/pre-commit-makefile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shini4i%2Fpre-commit-makefile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28886881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: 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":["makefile","pre-commit","pre-commit-hooks"],"created_at":"2024-11-08T20:14:56.411Z","updated_at":"2026-01-29T22:02:16.331Z","avatar_url":"https://github.com/shini4i.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🛠 pre-commit-makefile 🛠\n\nThis project allows users to automatically update their README.md with descriptions of Makefile targets.\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/shini4i/pre-commit-makefile/run-tests.yml?branch=main)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/shini4i/pre-commit-makefile)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/shini4i/pre-commit-makefile)\n[![codecov](https://codecov.io/gh/shini4i/pre-commit-makefile/graph/badge.svg?token=JXN63AUFFW)](https://codecov.io/gh/shini4i/pre-commit-makefile)\n[![Go Report Card](https://goreportcard.com/badge/github.com/shini4i/pre-commit-makefile)](https://goreportcard.com/report/github.com/shini4i/pre-commit-makefile)\n![GitHub](https://img.shields.io/github/license/shini4i/pre-commit-makefile)\n\n\u003c/div\u003e\n\n## Prerequisites\n\nTo use this project, you need to install `pre-commit-makefile` binary. You can do this by running:\n\n```bash\nbrew install shini4i/tap/pre-commit-makefile\n````\n\nOr by downloading the desired version from [releases](https://github.com/shini4i/pre-commit-makefile/releases) page.\n\nThe expected `Makefile` format is the following:\n\n```makefile\n.PHONY: help\nhelp: ## print this help\n\t@echo \"Usage: make [target]\"\n\t@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = \":.*?## \"}; {printf \"\\033[36m%-30s\\033[0m %s\\n\", $$1, $$2}'\n\n.PHONY: test\ntest: ## run tests\n\t@go test -v ./... -count=1\n```\n\n\u003e **Note**\nThe content after  `##` will be used as a target description\n\n## Configuration\n\nTo start using this project, add the following to your `.pre-commit-config.yaml`:\n\n```yaml\nrepos:\n  - repo: https://github.com/shini4i/pre-commit-makefile\n    rev: v0.2.2\n    hooks:\n      - id: makefile-validator\n      - id: makefile-readme-updater\n```\n\n## Validator\n\nCurrently, the validator is limited to checking if the `Makefile` targets have relevant `.PHONY` definitions.\n\nNo additional configuration is required.\n\n## Readme Updater\n\nThe following comment markers should be added to your `README.md`:\n\n```markdown\n\u003c!-- BEGINNING OF PRE-COMMIT-MAKEFILE HOOK --\u003e\n\u003c!-- END OF PRE-COMMIT-MAKEFILE HOOK --\u003e\n```\n\nThe dynamically generated content will be placed between the markers.\n\nAdditionally, it is possible to override a few settings by adding the following arguments to your `.pre-commit-config.yaml`:\n\n```yaml\nargs:\n  - --readme-path=docs/README.md\n  - --section-name=## Usage\n```\n\n#### Example\nThe `Makefile` in this repository will produce the following output:\n\nTo install dependencies run:\n\n```bash\nmake install-deps\n```\n\nTo build project binary run:\n\n```bash\nmake build\n```\n\nTo run tests run:\n\n```bash\nmake test\n```\n\nTo run tests with coverage run:\n\n```bash\nmake test-coverage\n```\n\nTo remove build artifacts run:\n\n```bash\nmake clean\n```\n\n\u003e **Note**\nThe generated content will be placed under `## Makefile targets` section.\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshini4i%2Fpre-commit-makefile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshini4i%2Fpre-commit-makefile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshini4i%2Fpre-commit-makefile/lists"}