1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-Karmada

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
.golangci.yml 3.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
wei-chenglai Отправлено 14.04.2025 05:42 48bab14
# 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 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-Karmada.git
git@api.gitlife.ru:oschina-mirror/mirrors-Karmada.git
oschina-mirror
mirrors-Karmada
mirrors-Karmada
master