feat: add official pre-commit hook support by juftin · Pull Request #2741 · go-task/task
Summary
Closes #2562.
Adds official pre-commit support by adding a .pre-commit-hooks.yaml at the repository root. This allows users to reference repo: https://github.com/go-task/task directly in their .pre-commit-config.yaml rather than maintaining a local hook definition.
Changes
.pre-commit-hooks.yaml: defines a singletaskhook withlanguage: golang,pass_filenames: false,require_serial: true, andminimum_pre_commit_version: "3.0.0"(required for golang language support)precommit_test.go: validates the hook file is present, parses as valid YAML, and asserts all fields are correctly setwebsite/src/docs/integrations.md: documents the integration with setup instructions, a configuration reference table, and collapsible examples covering common use caseswebsite/src/docs/changelog.md: adds a changelog entry
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a static config file added to the task repo. I don't see the point of a test.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's completely fair - I'm happy to remove it. The idea there was that a test could monitor that the file doesn't change its format - but agreed that it doesn't do much to guarantee functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters