Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gometalinter flakes by setting CGO_ENABLED=0 #18

Merged
merged 1 commit into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ jobs:
docker:
- image: supinf/gometalinter:latest
working_directory: /go/src/github.com/CircleCI-Public/circleci-cli
environment:
CGO_ENABLED: 0
steps:
- checkout
- run: gometalinter --deadline 60s --exclude=/usr/local/go/ --exclude ^vendor ./...
- run: gometalinter ./...

deploy:
executor: go
Expand Down
34 changes: 34 additions & 0 deletions .gometalinter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"Vendor": true,
"Deadline": "5m",
"Concurrency": 2,
"Linters": {
"gofmt": {"Command": "gofmt -l -s -w"},
"goimports": {"Command": "goimports -l -w"}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just for convenience. It adds the -w flags for these two commands so that if you run it locally, and there are errors, the fixes for the errors will be written.

},

"Enable": [
"deadcode",
"errcheck",
"gas",
"goconst",
"gocyclo",
"gofmt",
"goimports",
"golint",
"gosimple",
"gotype",
"gotypex",
"ineffassign",
"interfacer",
"megacheck",
"misspell",
"nakedret",
"structcheck",
"unconvert",
"unparam",
"varcheck",
"vet",
"vetshadow"
]
}
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func MakeCommands() *cobra.Command {
// https://github.com/spf13/cobra/issues/340
// If you expose a command with `RunE`, and return an error from your
// command, then Cobra will print the error message, followed by the usage
// infomation for the command. This makes it really difficult to see what's
// information for the command. This makes it really difficult to see what's
// gone wrong. It usually prints a one line error message followed by 15
// lines of usage information.
// This flag disables that behaviour, so that if a comment fails, it prints
Expand Down