Skip to content

Integration as a pre-commit hook #19

@Lucas-C

Description

@Lucas-C

Hi.

Some devs at Yelp have written a CLI tool to register & run git pre-commit hooks easily : http://pre-commit.com

I've contributed a few hooks myself in Python, and they just added support for Go hooks: pre-commit/pre-commit#430

Hence I tried to add a checkmake-based hook : https://github.com/Lucas-C/pre-commit-hooks-go

However the fact that it requires a make invocation to build makes it "non standard".
At the moment, pre-commit only support go get ./... + the installation of additional dependencies: https://github.com/pre-commit/pre-commit/blob/master/pre_commit/languages/golang.py#L67

Do you think it would be possible to make some changes to the build process of checkmake in order to integrate it as a pre-commit hook ?

There are 2 options I think:

  • the simplest : make it installable with a simple go get ./...
  • use a common tool instead. I don't know much about the Go ecosystem : maybe gb or gom ? And then we would check with the pre-commit dev team if they are OK to support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions