🤖 Add .golangci file, skip tests/ dir

This commit is contained in:
Ettore Di Giacinto
2022-10-13 09:22:51 +00:00
parent 23ca11a21e
commit 01a267e8b9
4 changed files with 28 additions and 1 deletions

25
.golangci.yml Normal file
View File

@@ -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

1
go.mod
View File

@@ -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

1
go.sum
View File

@@ -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=

View File

@@ -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"
)