Code Monkey home page Code Monkey logo

gosweep's Introduction

GoSweep

This script performs the build, test and automatic checking of a Go package and its sub-packages using:

  1. gofmt
  2. goimports
  3. golint
  4. go vet
  5. ineffassign
  6. race detector
  7. test coverage on package and its sub-packages, /vendor directories excluded
  8. goveralls
  9. gocyclo
  10. misspell

Migrated from my Gist.

Dependencies

To setup all the dependencies need to run the script do:

$ go get -v github.com/client9/misspell/cmd/misspell
$ go get -v github.com/fzipp/gocyclo
$ go get -v github.com/golang/lint/golint
$ go get -v github.com/gordonklaus/ineffassign
$ go get -v github.com/h12w/gosweep
$ go get -v github.com/mattn/goveralls
$ go get -v golang.org/x/tools/cmd/goimports

Environment variables

  • GOCYCLO_COMPLEXITY: maximum allowed function complexity threshold (default: 5).
  • MISSPELL_LOCALE: English locale (default: US).

If you wish to set this for a project you can create a .gosweep file. For example:

$ cat .gosweep
GOCYCLO_COMPLEXITY=5
MISSPELL_LOCALE='US'

Continuous Integration

travis-ci

Example of .travis.yml file for Go:

language: go
cache:
  directories:
    - ${GOPATH}/src/github.com/${TRAVIS_REPO_SLUG}/vendor
    - ${GOPATH}/src/github.com/fzipp
    - ${GOPATH}/src/github.com/golang
    - ${GOPATH}/src/github.com/gordonklaus
    - ${GOPATH}/src/github.com/h12w
    - ${GOPATH}/src/github.com/mattn
go:
  - tip
  - 1.8
  - 1.7
  - 1.6
sudo: false

env:
    CI_SERVICE=travis-ci

install:
  - go get -v github.com/client9/misspell/cmd/misspell
  - go get -v github.com/fzipp/gocyclo
  - go get -v github.com/golang/lint/golint
  - go get -v github.com/gordonklaus/ineffassign
  - go get -v github.com/h12w/gosweep
  - go get -v github.com/mattn/goveralls
  - go get -v -u golang.org/x/tools/cmd/goimports

script:
  - bash ${GOPATH}/src/github.com/h12w/gosweep/gosweep.sh

gosweep's People

Contributors

steenzout avatar h12w avatar

Watchers

James Cloos 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.