Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
Mauro Morales 2025-03-28 15:50:29 +01:00
parent 0796124789
commit e2fe760d9d
No known key found for this signature in database
GPG Key ID: 0069994DD7392198
3 changed files with 32 additions and 20 deletions

View File

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

View File

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

View File

@ -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() {