Слияние кода завершено, страница обновится автоматически
# This files contains all configuration options for analysis running.
# More details please refer to: https://golangci-lint.run/usage/configuration/
version: "2"
run:
# timeout for analysis, e.g. 30s, 5m, default timeout is disabled
timeout: 10m
# One of 'readonly' and 'vendor'.
# - readonly: the go command is disallowed from the implicit automatic updating of go.mod described above.
# Instead, it fails when any changes to go.mod are needed. This setting is most useful to check
# that go.mod does not need updates, such as in a continuous integration and testing system.
# - vendor: the go command assumes that the vendor directory holds the correct copies of dependencies and ignores
# the dependency descriptions in go.mod.
modules-download-mode: readonly
linters:
enable:
- depguard
- gocyclo
- gosec
- misspell
- revive
- whitespace
settings:
depguard:
rules:
main:
deny:
- pkg: io/ioutil
desc: 'replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil'
gocyclo:
# minimal cyclomatic complexity to report
min-complexity: 15
revive:
rules:
# Disable if-return as it is too strict and not always useful.
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
- name: if-return
disabled: true
# Disable package-comments for now since most packages in this project are primarily for internal use.
# If we decide to provide public packages in the future, we can move them to a separate
# repository and revisit adding package-level comments at that time.
- name: package-comments
disabled: true
- name: superfluous-else
arguments:
- preserveScope
- name: error-strings
- name: error-return
- name: receiver-naming
- name: increment-decrement
- name: range
- name: error-naming
- name: dot-imports
- name: errorf
- name: exported
- name: var-declaration
- name: blank-imports
- name: indent-error-flow
- name: unreachable-code
- name: var-naming
- name: redefines-builtin-id
- name: unused-parameter
- name: context-as-argument
- name: context-keys-type
- name: unexported-return
- name: time-naming
- name: empty-block
staticcheck:
checks:
- all
# Disable QF1008 to retain embedded fields for better readability.
- "-QF1008"
# Disable ST1000 (staticcheck) for now since most packages in this project are primarily for internal use.
# If we decide to provide public packages in the future, we can move them to a separate
# repository and revisit adding package-level comments at that time.
- "-ST1000"
exclusions:
generated: lax
presets:
- common-false-positives
- legacy
- std-error-handling
paths:
- hack/tools/preferredimports
- (^|/)vendor($|/)
- (^|/)third_party($|/)
- pkg/util/lifted
formatters:
enable:
- gci
- gofmt
- goimports
settings:
gci:
sections:
- Standard
- Default
- Prefix(github.com/karmada-io/karmada)
goimports:
local-prefixes:
- github.com/karmada-io/karmada
exclusions:
generated: lax
paths:
- hack/tools/preferredimports
- (^|/)vendor($|/)
- (^|/)third_party($|/)
- pkg/util/lifted
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )