• Stars
    star
    655
  • Rank 68,765 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Golang hooks for pre-commit

pre-commit-golang

🚨 Please see the project sunsetting announcement: Issues/98 🚨


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

Using these hooks

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

- repo: https://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: golangci-lint
    - id: go-critic
    - id: go-unit-tests
    - id: go-build
    - id: go-mod-tidy

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 but is unmaintained & deprecated in favour of golangci-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
  • 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
  • go-mod-tidy - run go mod tidy -v, requires golang
  • go-mod-vendor - run go mod vendor, requires golang

More Repositories

1

dobi

A build automation tool for Docker applications
Go
310
star
2

docker-apk-build

An alpine linux environment for building apk packages using docker
Makefile
65
star
3

PyStaticConfiguration

A python library for loading and reading configuration
Python
64
star
4

filewatcher

A command line tool to execute commands when files are modified.
Go
52
star
5

compose-addons

Tools to supplement the feature set of docker-compose
Python
50
star
6

alpine-package-mirror

Dockerfile to run an alpine package mirror or private package repo
Shell
26
star
7

TracAdvancedSearchPlugin

A plugin for Trac that provides an extension point for attaching a full text search engine. Including a backend for Solr.
JavaScript
19
star
8

multirepo-orb

Multirepo and monorepo support for CircleCI jobs.
Shell
11
star
9

alpine-s6

Minimal example of using s6 in a docker container to handle signals as pid1
Shell
11
star
10

Sudoku-Solver

Solves sudoku puzzles in under a second
Python
10
star
11

swagger-gen-types

generate go types from a swagger spec
Go
9
star
12

Turntable.fm-chat-bot

Ui Improvements and some TT helpers
CoffeeScript
8
star
13

goimportgraph

Generate a .dot file from a go package import graph
Go
7
star
14

openLETS

An open source local exchange trading system
Python
6
star
15

go-sugar

All the things I think I'm missing from Go
5
star
16

PyAutoTest

Automatically run unit tests when a file is modified.
Python
4
star
17

rss-digest

Python
3
star
18

compose-swarm-sandbox

A sandboxed swarm cluster - using compose
Shell
3
star
19

python-api-factory

Python library for creating API clients and generic servlets
Python
3
star
20

Spite-And-Malice

Spite and Malice the card game.
Python
2
star
21

Perzoot-Crawler-Trainer--Chrome-Extension-

A Chrome extension to annotate urls and send the annotated html markup to a server.
JavaScript
2
star
22

Yelp-Command-Line-API-Client

A quick app written for Yelp Hacakthon5
Python
2
star
23

docker-swarm-slave

Docker image for running a swarm slave dind
Shell
1
star
24

dotfiles

Shell
1
star
25

configtf

Config deserialization library for golang
Go
1
star
26

savages-hockey

Player attendance django app for Savages ball hockey
Python
1
star
27

PstatsInteractive

A web service to interactively inspect large python profiles.
Python
1
star
28

Threaded-Crawler

Python
1
star
29

Find-Similar-Documents

Python
1
star
30

gorepack

Rename go packages and imports for vanity urls or code migration
Go
1
star
31

project-quill

1
star
32

go-astk

Go abstract syntax tree toolkit
Go
1
star
33

presentation

Presentation template using reveal.js, each branch is a presentation
CSS
1
star
34

Tron-Learning-Group

The slides for my presentation on Tron for Yelp learning group.
JavaScript
1
star
35

plsdo

Shell
1
star
36

Simple-Backup-Util

Highly configurable personal backup solution
Python
1
star
37

TreeOrg

Tree Organizer using Google App Engine, web.py, coffeescript, backbone.js
Python
1
star
38

dockerd-load-test

Python
1
star
39

quill-data-format

JavaScript
1
star
40

golang-orb

CircleCI commands for Go projects.
Shell
1
star
41

Media-Mover

Wrapper around ssh to simplify synchronization of media files between computers.
Python
1
star