diff --git a/.trunk/configs/.golangci.yml b/.golangci.yml similarity index 68% rename from .trunk/configs/.golangci.yml rename to .golangci.yml index 34374f55..57c2227d 100644 --- a/.trunk/configs/.golangci.yml +++ b/.golangci.yml @@ -1,4 +1,8 @@ issues: + exclude-dirs: + - hack + exclude-files: + - api/v1alpha1/zz_generated.deepcopy.go exclude-rules: - path: _test\.go linters: @@ -8,8 +12,8 @@ issues: - golint text: underscore - linters: - - gomnd - text: "mnd: Magic number: 0o644" + - mnd + text: "Magic number: 0o644" linters: disable-all: true @@ -24,13 +28,16 @@ linters: - staticcheck - unconvert - unused - - vet - goimports - - gomnd + - govet + - mnd + +linters-settings: + govet: + enable-all: true + disable: + - fieldalignment + - shadow run: timeout: 10m - skip-dirs: - - hack - skip-files: - - api/v1alpha1/zz_generated.deepcopy.go diff --git a/generators/docs/validator.go b/generators/docs/validator.go index 5cb602cc..9e330a2f 100644 --- a/generators/docs/validator.go +++ b/generators/docs/validator.go @@ -170,7 +170,7 @@ func setUsageExamples(examplesDir string, validators map[string]schemaValidator, Value: strings.TrimSpace(string(exampleData)), } title := strings.Split(match, ".") - // trunk-ignore(golangci-lint/gomnd): splits foo.title.yaml and takes the middle part + // nolint:mnd // splits foo.title.yaml and takes the middle part if len(title) > 2 { // Just takes the part after the kind name example.Title = title[1] diff --git a/tests/session.go b/tests/session.go index 677a161b..a9d318ea 100644 --- a/tests/session.go +++ b/tests/session.go @@ -308,7 +308,7 @@ func getNamespacedName(keys ...string) (types.NamespacedName, error) { case 1: name = keys[0] namespace = defaultNamespace - case 2: //nolint:gomnd + case 2: //nolint:mnd name = keys[0] namespace = keys[1] default: