From 01a267e8b96da0f143953d8cd02ada80b1e2c9d0 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 13 Oct 2022 09:22:51 +0000 Subject: [PATCH] :robot: Add .golangci file, skip tests/ dir --- .golangci.yml | 25 +++++++++++++++++++++++++ go.mod | 1 + go.sum | 1 + internal/provider/upgrade.go | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..67c8d64 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,25 @@ +run: + timeout: 5m + tests: false + skip-dirs: + - tests/ +linters: + enable: + - revive # replacement for golint + - dupl # check duplicated code + - goconst # check strings that can turn into constants + - gofmt # check fmt + - goheader # Check license headers, only checks files in current year + - goimports # check imports + - gocyclo # check complexity + - govet + - gosimple + - deadcode + - ineffassign + - unused + - varcheck + - staticcheck + - typecheck + - structcheck + - godot + - misspell diff --git a/go.mod b/go.mod index 8949303..b9d7932 100644 --- a/go.mod +++ b/go.mod @@ -70,6 +70,7 @@ require ( github.com/google/btree v1.0.1 // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/google/gopacket v1.1.19 // indirect + github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gookit/color v1.5.0 // indirect diff --git a/go.sum b/go.sum index 2156ccf..d353ea0 100644 --- a/go.sum +++ b/go.sum @@ -506,6 +506,7 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= diff --git a/internal/provider/upgrade.go b/internal/provider/upgrade.go index 0cd6ba9..5407d14 100644 --- a/internal/provider/upgrade.go +++ b/internal/provider/upgrade.go @@ -4,8 +4,8 @@ import ( "encoding/json" "strings" - "github.com/kairos-io/kairos/pkg/utils" "github.com/google/go-containerregistry/pkg/crane" + "github.com/kairos-io/kairos/pkg/utils" "github.com/mudler/go-pluggable" )