Skip to content

Commit

Permalink
Rebased with master
Browse files Browse the repository at this point in the history
  • Loading branch information
sayboras committed Dec 4, 2019
1 parent bd57142 commit daaaa2c
Show file tree
Hide file tree
Showing 21 changed files with 227 additions and 78 deletions.
39 changes: 28 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run:
concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 5m
timeout: 5m

# exit code when at least one issue was found, default is 1
issues-exit-code: 1
Expand All @@ -24,9 +24,12 @@ run:
skip-dirs:
- ^vendor$
- ^build$
- ^eks\/mocks$
- ^pkg\/eks\/mocks$
- \/usr\/local\/go
- ^pkg\/testutils
- ^pkg\/drain
- ^vendor/github.com/awslabs/goformation

# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
Expand All @@ -35,7 +38,13 @@ run:
skip-files:
# - ".*\\.my\\.go$"
# - lib/bad.go
- pkg/nodebootstrap/assets.go
- ^pkg\/nodebootstrap\/assets.go
- ^pkg\/nodebootstrap\/assets.go
- ^pkg\/testutils\/(ginkgo|client).go
- ^pkg\/testutils\/mockprovider\/mock_provider.go
- ^pkg\/cfn\/template\/matchers\/matchers.go
- ^integration\/matchers\/matchers.go
- ^integration\/runner\/runner.go


# output configuration options
Expand All @@ -62,7 +71,7 @@ linters-settings:
check-blank: false
govet:
# report about shadowed variables
check-shadowing: true
check-shadowing: false

# Obtain type information from installed (to $GOPATH/pkg) package files:
# golangci-lint will execute `go install -i` and `go test -i` for analyzed packages
Expand Down Expand Up @@ -106,7 +115,7 @@ linters-settings:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
locale: UK
locale: default
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
Expand Down Expand Up @@ -144,11 +153,19 @@ linters-settings:


linters:
enable-all: true
disable:
disable-all: true
enable:
- gofmt
- unused
- govet
- golint
- errcheck
- deadcode
- misspell
- goimports
- maligned
- prealloc
- gocyclo # TODO: enable this in the future
- lll #TODO: enable this in the future
- gosec #TODO: enable this in the future
# TODO: enable the below linter in the future
# - maligned
# - prealloc
# - gocyclo
# - lll
# - gosec
21 changes: 0 additions & 21 deletions .gometalinter.json

This file was deleted.

4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ endif

.PHONY: lint
lint: ## Run linter over the codebase
time "$(GOBIN)/gometalinter" ./pkg/... ./cmd/... ./integration/...
# Install golangci-lint here till the build docker image is updated
go get github.com/golangci/golangci-lint/cmd/golangci-lint
time "$(GOBIN)/golangci-lint" run

.PHONY: test
test:
Expand Down
7 changes: 4 additions & 3 deletions cmd/schema/generate.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package main

import (
"github.com/alecthomas/jsonschema"
api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"io/ioutil"
"os"
"sigs.k8s.io/yaml"
"strings"

"github.com/alecthomas/jsonschema"
api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"sigs.k8s.io/yaml"
)

func main() {
Expand Down
17 changes: 7 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/gobwas/glob v0.2.3
github.com/gofrs/flock v0.7.1 // indirect
github.com/gohugoio/hugo v0.55.6
github.com/google/btree v1.0.0 // indirect
github.com/golangci/golangci-lint v1.21.0
github.com/google/certificate-transparency-go v1.0.21 // indirect
github.com/goreleaser/goreleaser v0.110.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
Expand All @@ -48,24 +48,23 @@ require (
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-zglob v0.0.1 // indirect
github.com/miekg/coredns v0.0.0-20170910182647-1b60688dc8f7 // indirect
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/onsi/ginkgo v1.10.1
github.com/onsi/gomega v1.7.0
github.com/pelletier/go-toml v1.4.0 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.1
github.com/pkg/sftp v1.8.3 // indirect
github.com/riywo/loginshell v0.0.0-20190610082906-2ed199a032f6
github.com/sanathkr/yaml v1.0.0 // indirect
github.com/sirupsen/logrus v1.4.2 // indirect

github.com/spf13/afero v1.2.2

github.com/spf13/cobra v0.0.4
github.com/spf13/cobra v0.0.5

github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.3.2
github.com/spf13/viper v1.4.0
github.com/spotinst/spotinst-sdk-go v0.0.0-20181012192533-fed4677dbf8f // indirect
github.com/stretchr/testify v1.3.0
github.com/stretchr/testify v1.4.0
github.com/tidwall/gjson v1.1.3
github.com/tidwall/match v1.0.0 // indirect
github.com/tidwall/sjson v1.0.2
Expand All @@ -77,9 +76,7 @@ require (
github.com/whilp/git-urls v0.0.0-20160530060445-31bac0d230fa
github.com/zmap/zlint v0.0.0-20190806182416-88c3f6b6f2f5 // indirect
go.etcd.io/bbolt v1.3.3 // indirect
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac
golang.org/x/tools v0.0.0-20191010075000-0337d82405ff
google.golang.org/grpc v1.21.1 // indirect
gopkg.in/gcfg.v1 v1.2.3 // indirect
gopkg.in/ini.v1 v1.42.0 // indirect
Expand Down
Loading

0 comments on commit daaaa2c

Please sign in to comment.