Skip to content

Mirror of gofumpt for pre-commit.

License

BSD-3-Clause, BSD-3-Clause licenses found

Licenses found

BSD-3-Clause
LICENSE
BSD-3-Clause
LICENSE.google
Notifications You must be signed in to change notification settings

trallnag/pre-commit-mirror-gofumpt

Mirror of gofumpt for pre-commit

This repository mirrors mvdan/gofumpt releases and adds a pre-commit configuration so that people can use gofumpt as a pre-commit hook. Note that the hook configuration uses golang as language instead of script or system. This means that pre-commit handles installing Go and gofumpt if they are not found.

To use the hook, add the following to your .pre-commit-config.yaml file:

repo: https://github.com/trallnag/pre-commit-mirror-gofumpt
rev: v0.4.0
hooks:
  - id: gofumpt

How to update this repository once there is a new version of gofumpt?

  1. Checkout both repos locally.
  2. Delete everything in this repo except README.md and .pre-commit-hooks.yaml.
  3. Copy over everything from gofumpt except README.md and .github.
  4. Commit, tag, and push.

Maybe at some point pre-commit-mirror-maker will support Go. Until then this workaround is good enough. There is an open issue for this here.

About

Mirror of gofumpt for pre-commit.

Resources

License

BSD-3-Clause, BSD-3-Clause licenses found

Licenses found

BSD-3-Clause
LICENSE
BSD-3-Clause
LICENSE.google

Stars

Watchers

Forks

Languages