mirror of
https://github.com/kazhuravlev/database-gateway.git
synced 2025-06-24 09:10:48 +00:00
236 lines
6.5 KiB
YAML
236 lines
6.5 KiB
YAML
# Database Gateway provides access to servers with ACL for safe and restricted database interactions.
|
|
# Copyright (C) 2024 Kirill Zhuravlev
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
version: "2"
|
|
linters:
|
|
default: all
|
|
disable:
|
|
- godox
|
|
- govet
|
|
- nolintlint
|
|
- nosprintfhostport
|
|
- wrapcheck
|
|
- wsl
|
|
settings:
|
|
depguard:
|
|
rules:
|
|
logger:
|
|
files:
|
|
- '!**/pkg/logutils/**.go'
|
|
deny:
|
|
- pkg: github.com/sirupsen/logrus
|
|
desc: logging is allowed only by slog.Logger.
|
|
- pkg: github.com/pkg/errors
|
|
desc: Should be replaced by standard lib errors package.
|
|
- pkg: github.com/instana/testify
|
|
desc: It's a fork of github.com/stretchr/testify.
|
|
dupl:
|
|
threshold: 100
|
|
errorlint:
|
|
asserts: false
|
|
funlen:
|
|
lines: -1
|
|
statements: 50
|
|
goconst:
|
|
min-len: 2
|
|
min-occurrences: 3
|
|
gocritic:
|
|
disabled-checks:
|
|
- dupImport
|
|
- ifElseChain
|
|
- octalLiteral
|
|
- whyNoLint
|
|
enabled-tags:
|
|
- diagnostic
|
|
- experimental
|
|
- opinionated
|
|
- performance
|
|
- style
|
|
gocyclo:
|
|
min-complexity: 15
|
|
godox:
|
|
keywords:
|
|
- FIXME
|
|
govet:
|
|
enable:
|
|
- nilness
|
|
- shadow
|
|
settings:
|
|
printf:
|
|
funcs:
|
|
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
|
|
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
|
|
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
|
|
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
|
|
lll:
|
|
line-length: 140
|
|
misspell:
|
|
locale: US
|
|
ignore-rules:
|
|
- importas
|
|
mnd:
|
|
checks:
|
|
- argument
|
|
- case
|
|
- condition
|
|
- return
|
|
ignored-numbers:
|
|
- "0"
|
|
- "1"
|
|
- "2"
|
|
- "3"
|
|
ignored-functions:
|
|
- strings.SplitN
|
|
nolintlint:
|
|
require-explanation: true
|
|
require-specific: true
|
|
allow-unused: false
|
|
revive:
|
|
rules:
|
|
- name: indent-error-flow
|
|
- name: unexported-return
|
|
disabled: true
|
|
- name: unused-parameter
|
|
- name: unused-receiver
|
|
tagliatelle:
|
|
case:
|
|
rules:
|
|
json: snake
|
|
varnamelen:
|
|
ignore-names:
|
|
- i
|
|
- ok
|
|
- fn
|
|
ignore-decls:
|
|
- c echo.Context
|
|
- c *cli.Context
|
|
- id *UUID
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- comments
|
|
- common-false-positives
|
|
- legacy
|
|
- std-error-handling
|
|
rules:
|
|
- linters:
|
|
- dupl
|
|
- lll
|
|
- mnd
|
|
path: (.+)_test\.go
|
|
- linters:
|
|
- dupl
|
|
path: pkg/golinters
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/commands/run.go
|
|
text: 'SA1019: c.cfg.Run.ShowStats is deprecated: use Output.ShowStats instead.'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/errcheck/errcheck.go
|
|
text: 'SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/errcheck/errcheck.go
|
|
text: 'SA1019: errCfg.Ignore is deprecated: use ExcludeFunctions instead'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/govet/govet.go
|
|
text: 'SA1019: cfg.CheckShadowing is deprecated: the linter should be enabled inside Enable.'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/godot/godot.go
|
|
text: 'SA1019: settings.CheckAll is deprecated: use Scope instead'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/gci/gci.go
|
|
text: 'SA1019: settings.LocalPrefixes is deprecated: use Sections instead.'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/mnd/mnd.go
|
|
text: 'SA1019: settings.Settings is deprecated: use root level settings instead.'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/mnd/mnd.go
|
|
text: 'SA1019: config.GoMndSettings is deprecated: use MndSettings.'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/gofumpt/gofumpt.go
|
|
text: 'SA1019: settings.LangVersion is deprecated: use the global `run.go` instead.'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/golinters/internal/staticcheck_common.go
|
|
text: 'SA1019: settings.GoVersion is deprecated: use the global `run.go` instead.'
|
|
- linters:
|
|
- staticcheck
|
|
path: pkg/lint/lintersdb/manager.go
|
|
text: 'SA1019: (.+).(GoVersion|LangVersion) is deprecated: use the global `run.go` instead.'
|
|
- linters:
|
|
- gocritic
|
|
path: pkg/golinters/unused/unused.go
|
|
text: 'rangeValCopy: each iteration copies 160 bytes \(consider pointers or indexing\)'
|
|
- linters:
|
|
- gosec
|
|
path: pkg/goanalysis/runner_loadingpackage.go
|
|
text: 'G115: integer overflow conversion uintptr -> int'
|
|
- linters:
|
|
- gosec
|
|
path: test/bench/bench_test.go
|
|
text: 'G115: integer overflow conversion int -> int32'
|
|
- linters:
|
|
- gosec
|
|
path: test/bench/bench_test.go
|
|
text: 'G115: integer overflow conversion uint64 -> int'
|
|
paths:
|
|
- test/testdata_etc
|
|
- internal/cache
|
|
- internal/robustio
|
|
- internal/mmap
|
|
- internal/quoted
|
|
- internal/testenv
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|
|
formatters:
|
|
enable:
|
|
- gci
|
|
- gofmt
|
|
- gofumpt
|
|
- goimports
|
|
settings:
|
|
gofmt:
|
|
rewrite-rules:
|
|
- pattern: interface{}
|
|
replacement: any
|
|
goimports:
|
|
local-prefixes:
|
|
- github.com/golangci/golangci-lint
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- test/testdata_etc
|
|
- internal/cache
|
|
- internal/robustio
|
|
- internal/mmap
|
|
- internal/quoted
|
|
- internal/testenv
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|
|
|
|
output:
|
|
show-stats: false
|