mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-04-27 11:31:10 +00:00
golint
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
parent
0796124789
commit
e2fe760d9d
@ -1,23 +1,35 @@
|
||||
version: "2"
|
||||
run:
|
||||
timeout: 5m
|
||||
tests: false
|
||||
issues:
|
||||
exclude-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
|
||||
- ineffassign
|
||||
- unused
|
||||
- staticcheck
|
||||
- typecheck
|
||||
- dupl
|
||||
- goconst
|
||||
- gocyclo
|
||||
- godot
|
||||
- goheader
|
||||
- misspell
|
||||
- revive
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
paths:
|
||||
- tests/
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- goimports
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- tests/
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
|
@ -103,12 +103,12 @@ func register(loglevel, arg, configFile, device string, reboot, poweroff bool) e
|
||||
if arg != "" {
|
||||
isDir, err := isDirectory(arg)
|
||||
if err == nil && isDir {
|
||||
return fmt.Errorf("Cannot register with a directory, please pass a file.") //nolint:revive // This is a message printed to the user.
|
||||
return fmt.Errorf("cannot register with a directory, please pass a file")
|
||||
} else if err != nil {
|
||||
return err
|
||||
}
|
||||
if !isReadable(arg) {
|
||||
return fmt.Errorf("Cannot register with a file that is not readable.") //nolint:revive // This is a message printed to the user.
|
||||
return fmt.Errorf("cannot register with a file that is not readable")
|
||||
}
|
||||
}
|
||||
// dmesg -D to suppress tty ev
|
||||
|
@ -122,7 +122,7 @@ func (k *K0sNode) GenArgs() ([]string, error) {
|
||||
|
||||
pconfig := k.ProviderConfig()
|
||||
if !pconfig.P2P.UseVPNWithKubernetes() {
|
||||
return args, errors.New("Having a VPN but not using it for Kubernetes is not yet supported with k0s")
|
||||
return args, errors.New("having a VPN but not using it for Kubernetes is not yet supported with k0s")
|
||||
}
|
||||
|
||||
if pconfig.KubeVIP.IsEnabled() {
|
||||
|
Loading…
Reference in New Issue
Block a user