An open API service indexing awesome lists of open source software.

https://github.com/pztrn/pre-commit-hooks-golang

Hand-crafted pre-commit hooks for pre-commit.com
https://github.com/pztrn/pre-commit-hooks-golang

Last synced: 2 months ago
JSON representation

Hand-crafted pre-commit hooks for pre-commit.com

Awesome Lists containing this project

README

        

# pre-commit hooks for golang

This repository contains [pre-commit](https://pre-commit.com) hooks for modern Golang developers.

## Using

Add this to your ``.pre-commit-config.yaml``:

```yaml
repos:
- repo: https://sources.dev.pztrn.name/pztrn/pre-commit-hooks-golang
rev: master
hooks:
- id: golangci-lint-mod
...
```

## Hooks list

* ``go-test-mod-cover`` - executes ``go test`` with ``-cover`` parameter.
* ``golangci-lint-mod`` - executes ``golangci-lint`` in module mode (``GO111MODULES=on``)