Merge pull request #6358 from SDBrett/contributing-improve-clarity

added dependency install steps to linting
This commit is contained in:
Steven Zou 2018-11-27 18:34:26 +08:00 committed by GitHub
commit b406d7ccc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,6 +196,11 @@ Try to limit column width to 120 characters for both code and markdown documents
Always run [golint](https://github.com/golang/lint) on source code before Always run [golint](https://github.com/golang/lint) on source code before
committing your changes. committing your changes.
``` ```
#Install fgt and golint
go get -u golang.org/x/lint/golint
go get github.com/GeertJohan/fgt
#In the #working_dir/harbor, run #In the #working_dir/harbor, run
go list ./... | grep -v -E 'vendor|tests' | xargs -L1 fgt golint go list ./... | grep -v -E 'vendor|tests' | xargs -L1 fgt golint