Git Product home page Git Product logo

pre-commit-golang's Introduction

pre-commit-golang

golang hooks for http://pre-commit.com/

Using these hooks

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

- repo: git://github.com/dnephin/pre-commit-golang
  rev: master
  hooks:
    - id: go-fmt
    - id: go-vet
    - id: go-lint
    - id: go-imports
    - id: go-cyclo
      args: [-over=15]
    - id: validate-toml
    - id: no-go-testing
    - id: gometalinter
    - id: golangci-lint
    - id: go-critic
    - id: go-unit-tests
    - id: go-build

Available hooks

  • go-fmt - Runs gofmt, requires golang
  • go-vet - Runs go vet, requires golang
  • go-lint - Runs golint, requires https://github.com/golang/lint
  • go-imports - Runs goimports, requires golang.org/x/tools/cmd/goimports
  • go-cyclo - Runs gocyclo, require https://github.com/fzipp/gocyclo
  • validate-toml - Runs tomlv, requires https://github.com/BurntSushi/toml/tree/master/cmd/tomlv
  • no-go-testing - Checks that no files are using testing.T, if you want developers to use a different testing framework
  • gometalinter - run gometalinter --config gometalinter.json ./...
  • golangci-lint - run golangci-lint run ./..., requires golangci-lint
  • go-critic - run gocritic check ./..., requires go-critic
  • go-unit-tests - run go test -tags=unit -timeout 30s -short -v
  • go-build - run go build, requires golang

pre-commit-golang's People

Contributors

dnephin avatar covertbert avatar colinschoen avatar rumyantseva avatar flw-cn avatar korjavin avatar vallieres avatar lockercho avatar jonyhy96 avatar ramonhpr avatar jerome1337 avatar jasonfriedland avatar michilu avatar davidpfarrell avatar borisbabic avatar asottile avatar akostibas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.