This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: apply linter for better quality code (#55)
* apply linter * update makefile * update travis yml
- Loading branch information
Showing
12 changed files
with
355 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ cover.html | |
.glide/ | ||
faker | ||
vendor/ | ||
|
||
coverage.txt | ||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
BINARY=faker | ||
TESTS=go test $$(go list ./... | grep -v /vendor/) -cover | ||
|
||
build: | ||
${TESTS} | ||
go build -o ${BINARY} | ||
build: test | ||
@go build ./... | ||
|
||
install: | ||
${TESTS} | ||
go build -o ${BINARY} | ||
test: | ||
@go test -v ./... -cover -race -coverprofile=coverage.txt -covermode=atomic | ||
|
||
unittest: | ||
go test -short $$(go list ./... | grep -v /vendor/) | ||
@go test -v -short ./... | ||
|
||
# Linter | ||
lint-prepare: | ||
@echo "Installing golangci-lint" | ||
# @go get -u github.com/golangci/golangci-lint/cmd/golangci-lint | ||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.13.2 | ||
|
||
lint: | ||
./bin/golangci-lint run \ | ||
--exclude="cyclomatic complexity" \ | ||
--exclude-use-default=false \ | ||
--enable=golint \ | ||
--enable=gocyclo \ | ||
--enable=goconst \ | ||
--enable=unconvert \ | ||
./... | ||
clean: | ||
if [ -f ${BINARY} ] ; then rm ${BINARY} ; fi | ||
|
||
.PHONY: lint lint-prepare clean build unittest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,49 @@ | ||
module github.com/bxcodec/faker/v3 | ||
|
||
require ( | ||
github.com/OpenPeeDeeP/depguard v0.0.0-20181229194401-1f388ab2d810 // indirect | ||
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect | ||
github.com/coreos/etcd v3.3.11+incompatible // indirect | ||
github.com/fatih/color v1.7.0 // indirect | ||
github.com/go-critic/go-critic v0.3.4 // indirect | ||
github.com/go-ole/go-ole v1.2.2 // indirect | ||
github.com/go-toolsmith/astcast v1.0.0 // indirect | ||
github.com/go-toolsmith/astcopy v1.0.0 // indirect | ||
github.com/go-toolsmith/astfmt v1.0.0 // indirect | ||
github.com/go-toolsmith/astp v1.0.0 // indirect | ||
github.com/go-toolsmith/pkgload v1.0.0 // indirect | ||
github.com/go-toolsmith/typep v1.0.0 // indirect | ||
github.com/gogo/protobuf v1.2.0 // indirect | ||
github.com/golang/mock v1.2.0 // indirect | ||
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 // indirect | ||
github.com/golangci/go-tools v0.0.0-20180902103155-93eecd106a0b // indirect | ||
github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d // indirect | ||
github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98 // indirect | ||
github.com/golangci/golangci-lint v1.13.2 // indirect | ||
github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219 // indirect | ||
github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039 // indirect | ||
github.com/golangci/tools v0.0.0-20190108095906-d95fd85c147a // indirect | ||
github.com/kr/pty v1.1.3 // indirect | ||
github.com/mattn/go-isatty v0.0.4 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect | ||
github.com/onsi/ginkgo v1.7.0 // indirect | ||
github.com/onsi/gomega v1.4.3 // indirect | ||
github.com/pkg/errors v0.8.1 // indirect | ||
github.com/shirou/gopsutil v2.18.12+incompatible // indirect | ||
github.com/shurcooL/go v0.0.0-20190121191506-3fef8c783dec // indirect | ||
github.com/sirupsen/logrus v1.3.0 // indirect | ||
github.com/spf13/afero v1.2.1 // indirect | ||
github.com/spf13/cobra v0.0.3 // indirect | ||
github.com/spf13/viper v1.3.1 // indirect | ||
github.com/stretchr/testify v1.3.0 // indirect | ||
github.com/ugorji/go/codec v0.0.0-20190128213124-ee1426cffec0 // indirect | ||
golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613 // indirect | ||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3 // indirect | ||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect | ||
golang.org/x/sys v0.0.0-20190130150945-aca44879d564 // indirect | ||
golang.org/x/tools v0.0.0-20190131163942-067a2f313b69 // indirect | ||
mvdan.cc/unparam v0.0.0-20190131163057-1679b9996abd // indirect | ||
sourcegraph.com/sourcegraph/go-diff v0.5.0 // indirect | ||
sourcegraph.com/sqs/pbtypes v1.0.0 // indirect | ||
) |
Oops, something went wrong.