I am trying to build a custom pre-commit hook written in Go. It should run on python file.
The project has the following architecture:
comche/
├── cmd/
│ └── main.go
├── scripts/
│ └── main -> build with "go build -o scripts/ cmd/main.go"
├── .pre-commit-hooks.yaml
├── go.mod
├── .gitignore
└── README.md
I have setup the .pre-commit-hooks.yaml
has follow:
- id: comche
name: comche
description: "Check Python files for TODO, BUG, and FIXME comments"
entry: main
language: golang
language_version: system
types: [python]
additional_dependencies: []
But when I install/setup the pre-commit on another repo to make test, I have the following error: “Executable main
not found”!
I have tried to change the entry
point, such as, ./scripts/main
, cmd/main.go
, main.go
or comche/scripts/main
without success.
Do you have any id of what I am missing?
Thanks in advance for your help!