93 lines
1.8 KiB
YAML
93 lines
1.8 KiB
YAML
# Spark IM coding conventions for golangci-lint v1.
|
|
# Ported from BFF .golangci.yml (funlen/gocritic/lll/enable set) for Go 1.26.
|
|
run:
|
|
timeout: 10m
|
|
tests: true
|
|
go: "1.26"
|
|
|
|
linters-settings:
|
|
funlen:
|
|
lines: 100
|
|
statements: 100
|
|
lll:
|
|
line-length: 240
|
|
misspell:
|
|
locale: US
|
|
gocritic:
|
|
enabled-tags:
|
|
- performance
|
|
settings:
|
|
captLocal:
|
|
paramsOnly: true
|
|
rangeValCopy:
|
|
sizeThreshold: 32
|
|
goconst:
|
|
min-len: 3
|
|
min-occurrences: 3
|
|
dupl:
|
|
threshold: 150
|
|
goimports:
|
|
local-prefixes: spark-server
|
|
revive:
|
|
rules:
|
|
- name: blank-imports
|
|
- name: context-as-argument
|
|
- name: context-keys-type
|
|
- name: dot-imports
|
|
- name: error-return
|
|
- name: error-strings
|
|
- name: error-naming
|
|
- name: exported
|
|
- name: if-return
|
|
- name: increment-decrement
|
|
- name: var-naming
|
|
- name: var-declaration
|
|
- name: package-comments
|
|
- name: range
|
|
- name: receiver-naming
|
|
- name: time-naming
|
|
- name: unexported-return
|
|
- name: indent-error-flow
|
|
- name: errorf
|
|
- name: empty-block
|
|
- name: superfluous-else
|
|
- name: unused-parameter
|
|
- name: unreachable-code
|
|
- name: redefines-builtin-id
|
|
|
|
linters:
|
|
enable:
|
|
- errcheck
|
|
- gosimple
|
|
- govet
|
|
- ineffassign
|
|
- staticcheck
|
|
- unused
|
|
- misspell
|
|
- dupl
|
|
- unparam
|
|
- gocritic
|
|
- funlen
|
|
- goconst
|
|
- unconvert
|
|
- bodyclose
|
|
- sqlclosecheck
|
|
- gomodguard
|
|
- revive
|
|
- lll
|
|
- goimports
|
|
|
|
issues:
|
|
exclude:
|
|
- "SA1029"
|
|
- "SA1019"
|
|
exclude-rules:
|
|
- path: _test\.go
|
|
linters:
|
|
- dupl
|
|
- funlen
|
|
- goconst
|
|
- path: internal/module/.*/entity\.go
|
|
linters:
|
|
- unused
|