Removed dead code and added new travis tool

This commit is contained in:
2018-11-08 20:30:36 +09:00
parent 9da70decfe
commit fb881eed81
3 changed files with 14 additions and 28 deletions

View File

@ -28,18 +28,20 @@ before_script:
- go get golang.org/x/lint/golint # Linter
- go get honnef.co/go/tools/cmd/megacheck # Badass static analyzer/linter
- go get github.com/fzipp/gocyclo # Cyclomatic complexity
- go get github.com/3rf/codecoroner # Dead code analysis
- npm install -g typescript # TypeScript
- git clone --depth=1 https://github.com/animenotifier/database ~/.aero/db/arn # Database
# script always run to completion (set +e). All of these code checks are must haves
# in a modern Go project.
script:
- make deps # Get dependencies. Allow this to fail because components cannot be found.
- make all # Build
# - test -z $(gofmt -s -l $GO_FILES) # Fail if a .go file hasn't been formatted with gofmt
- go test -v . # Run all the tests
# - go test -v -race ./... # Run all the tests with the race detector enabled
- go vet ./... # go vet is the official Go static analyzer
- megacheck ./... # "go vet on steroids" + linter
- gocyclo -over 19 $GO_FILES # forbid code with huge functions
- golint -set_exit_status $(go list ./...) # one last linter
- make deps # Get dependencies. Allow this to fail because components cannot be found.
- make all # Build
# - test -z $(gofmt -s -l $GO_FILES) # Fail if a .go file hasn't been formatted with gofmt
- go test -v . # Run all the tests
# - go test -v -race ./... # Run all the tests with the race detector enabled
- go vet ./... # go vet is the official Go static analyzer
- megacheck ./... # "go vet on steroids" + linter
- gocyclo -over 19 $GO_FILES # forbid code with huge functions
- golint -set_exit_status $(go list ./...) # one last linter
- codecoroner -ignore components funcs ./... # dead code analysis