sigs.k8s.io/kubebuilder/v3@v3.14.0/.golangci.yml (about) 1 run: 2 deadline: 5m 3 allow-parallel-runners: true 4 5 issues: 6 # don't skip warning about doc comments 7 # don't exclude the default set of lint 8 exclude-use-default: false 9 # restore some of the defaults 10 # (fill in the rest as needed) 11 exclude-rules: 12 - linters: [gosec] 13 path: "test/e2e/*" 14 - path: "hack/docs/*" 15 linters: 16 - lll 17 - gosec 18 19 linters-settings: 20 govet: 21 enable=fieldalignment: true 22 revive: 23 rules: 24 # The following rules are recommended https://github.com/mgechev/revive#recommended-configuration 25 - name: blank-imports 26 - name: context-as-argument 27 - name: context-keys-type 28 - name: dot-imports 29 - name: error-return 30 - name: error-strings 31 - name: error-naming 32 - name: exported 33 disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings. 34 - name: if-return 35 disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings. 36 - name: increment-decrement 37 - name: var-naming 38 disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings. 39 - name: var-declaration 40 - name: package-comments 41 disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings. 42 - name: range 43 - name: receiver-naming 44 - name: time-naming 45 - name: unexported-return 46 - name: indent-error-flow 47 - name: errorf 48 - name: empty-block 49 disabled: true # TODO: Investigate if it should be enabled. Disabled for now due to many findings. 50 - name: superfluous-else 51 - name: unused-parameter 52 - name: unreachable-code 53 - name: redefines-builtin-id 54 # 55 # Rules in addition to the recommended configuration above. 56 # 57 - name: bool-literal-in-expr 58 - name: constant-logical-expr 59 60 linters: 61 disable-all: true 62 enable: 63 - dupl 64 - errcheck 65 - exportloopref 66 - goconst 67 - gocyclo 68 - gofmt 69 - goimports 70 - gosimple 71 - govet 72 - ineffassign 73 - lll 74 - misspell 75 - nakedret 76 - prealloc 77 - revive 78 - staticcheck 79 - typecheck 80 - unconvert 81 - unparam 82 - unused