|
| 1 | +run: |
| 2 | + concurrency: 4 |
| 3 | + timeout: 10m |
| 4 | +issues: |
| 5 | + # Show all errors. |
| 6 | + max-issues-per-linter: 0 |
| 7 | + max-same-issues: 0 |
| 8 | + exclude: |
| 9 | + - "don't use an underscore in package name" |
| 10 | +output: |
| 11 | + sort-results: true |
| 12 | + |
| 13 | +exclude-files: |
| 14 | + - "^zz_generated.*" |
| 15 | + |
| 16 | +linters-settings: |
| 17 | + gofumpt: |
| 18 | + extra-rules: true |
| 19 | + gci: |
| 20 | + sections: |
| 21 | + - standard |
| 22 | + - default |
| 23 | + - prefix(github.com/deckhouse/) |
| 24 | + goimports: |
| 25 | + local-prefixes: github.com/deckhouse/ |
| 26 | + errcheck: |
| 27 | + exclude-functions: fmt:.*,[rR]ead|[wW]rite|[cC]lose,io:Copy |
| 28 | + revive: |
| 29 | + rules: |
| 30 | + - name: dot-imports |
| 31 | + disabled: true |
| 32 | + nolintlint: |
| 33 | + # Exclude following linters from requiring an explanation. |
| 34 | + # Default: [] |
| 35 | + allow-no-explanation: [funlen, gocognit, lll] |
| 36 | + # Enable to require an explanation of nonzero length after each nolint directive. |
| 37 | + # Default: false |
| 38 | + require-explanation: true |
| 39 | + # Enable to require nolint directives to mention the specific linter being suppressed. |
| 40 | + # Default: false |
| 41 | + require-specific: true |
| 42 | + importas: |
| 43 | + # Do not allow unaliased imports of aliased packages. |
| 44 | + # Default: false |
| 45 | + no-unaliased: true |
| 46 | + # Do not allow non-required aliases. |
| 47 | + # Default: false |
| 48 | + no-extra-aliases: false |
| 49 | + # List of aliases |
| 50 | + # Default: [] |
| 51 | + alias: |
| 52 | + - pkg: github.com/deckhouse/virtualization/api/core/v1alpha2 |
| 53 | + alias: "" |
| 54 | + - pkg: github.com/deckhouse/virtualization/api/subresources/v1alpha2 |
| 55 | + alias: subv1alpha2 |
| 56 | + - pkg: kubevirt.io/api/core/v1 |
| 57 | + alias: virtv1 |
| 58 | + - pkg: k8s.io/api/core/v1 |
| 59 | + alias: corev1 |
| 60 | + - pkg: k8s.io/api/authentication/v1 |
| 61 | + alias: authnv1 |
| 62 | + - pkg: k8s.io/api/storage/v1 |
| 63 | + alias: storagev1 |
| 64 | + - pkg: k8s.io/api/networking/v1 |
| 65 | + alias: netv1 |
| 66 | + - pkg: k8s.io/api/policy/v1 |
| 67 | + alias: policyv1 |
| 68 | + - pkg: k8s.io/apimachinery/pkg/apis/meta/v1 |
| 69 | + alias: metav1 |
| 70 | + |
| 71 | +linters: |
| 72 | + disable-all: true |
| 73 | + enable: |
| 74 | + - asciicheck # checks that your code does not contain non-ASCII identifiers |
| 75 | + - bidichk # checks for dangerous unicode character sequences |
| 76 | + - bodyclose # checks whether HTTP response body is closed successfully |
| 77 | + - contextcheck # [maby too many false positives] checks the function whether use a non-inherited context |
| 78 | + - dogsled # checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) |
| 79 | + - errcheck # checking for unchecked errors, these unchecked errors can be critical bugs in some cases |
| 80 | + - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error |
| 81 | + - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13 |
| 82 | + - copyloopvar # detects places where loop variables are copied (Go 1.22+) |
| 83 | + - gci # controls golang package import order and makes it always deterministic |
| 84 | + - gocritic # provides diagnostics that check for bugs, performance and style issues |
| 85 | + - gofmt # [replaced by goimports] checks whether code was gofmt-ed |
| 86 | + - gofumpt # [replaced by goimports, gofumports is not available yet] checks whether code was gofumpt-ed |
| 87 | + - goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt |
| 88 | + - gosimple # specializes in simplifying a code |
| 89 | + - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string |
| 90 | + - ineffassign # detects when assignments to existing variables are not used |
| 91 | + - misspell # finds commonly misspelled English words in comments |
| 92 | + - nolintlint # reports ill-formed or insufficient nolint directives |
| 93 | + - reassign # Checks that package variables are not reassigned. |
| 94 | + - revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint |
| 95 | + - stylecheck # is a replacement for golint |
| 96 | + - staticcheck # is a go vet on steroids, applying a ton of static analysis checks |
| 97 | + - typecheck # like the front-end of a Go compiler, parses and type-checks Go code |
| 98 | + - testifylint # checks usage of github.com/stretchr/testify |
| 99 | + - unconvert # removes unnecessary type conversions |
| 100 | + - unparam # reports unused function parameters |
| 101 | + - unused # checks for unused constants, variables, functions and types |
| 102 | + - usetesting # reports uses of functions with replacement inside the testing package |
| 103 | + - testableexamples # checks if examples are testable (have an expected output) |
| 104 | + - thelper # detects golang test helpers without t.Helper() call and checks the consistency of test helpers |
| 105 | + - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes |
| 106 | + - whitespace # detects leading and trailing whitespace |
| 107 | + - wastedassign # Finds wasted assignment statements. |
| 108 | + - importas # checks import aliases against the configured convention |
0 commit comments