Skip to content

fix(pre-commit): Hooks should use the copywrite binary #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
- id: add-headers
name: Add copyright headers
description: Adds missing copyright headers to all source code files
entry: go run .
entry: copywrite headers
language: golang
args: [headers]
additional_dependencies:
- github.com/hashicorp/copywrite@v0.21.0
pass_filenames: false

- id: check-headers
name: Validate copyright headers
description: Checks if any copyright headers are missing, but does not make changes
entry: go run .
entry: copywrite headers --plan
language: golang
args: [headers --plan]
additional_dependencies:
- github.com/hashicorp/copywrite@v0.21.0
pass_filenames: false

- id: add-license
name: Add or fix repo license
description: Adds or updates a non-compliant LICENSE file
entry: go run .
entry: copywrite license
language: golang
args: [license]
additional_dependencies:
- github.com/hashicorp/copywrite@v0.21.0
pass_filenames: false

- id: check-license
name: Validate repo license
description: Checks if a LICENSE file is valid, but does not make changes
entry: go run .
entry: copywrite license --plan
language: golang
args: [license --plan]
additional_dependencies:
- github.com/hashicorp/copywrite@v0.21.0
pass_filenames: false
Loading