mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-31 11:52:41 +00:00
In some cases, loop variables had to be reassigned to a local variable to avoid concurrent access. This will no longer be needed when fiber's minimum go version is bumped to 1.22, where each loop iteration gets its own variable.
208 lines
3.8 KiB
YAML
208 lines
3.8 KiB
YAML
# Created based on v1.51.0
|
|
# NOTE: Keep this in sync with the version in .github/workflows/linter.yml
|
|
|
|
run:
|
|
modules-download-mode: readonly
|
|
skip-dirs-use-default: false
|
|
skip-dirs:
|
|
- internal
|
|
|
|
output:
|
|
sort-results: true
|
|
|
|
linters-settings:
|
|
errcheck:
|
|
check-type-assertions: true
|
|
check-blank: true
|
|
disable-default-exclusions: true
|
|
|
|
errchkjson:
|
|
report-no-exported: true
|
|
|
|
exhaustive:
|
|
default-signifies-exhaustive: true
|
|
|
|
forbidigo:
|
|
forbid:
|
|
- ^(fmt\.Print(|f|ln)|print|println)$
|
|
- 'http\.Default(Client|Transport)'
|
|
# TODO: Eventually enable these patterns
|
|
# - 'time\.Sleep'
|
|
# - 'panic'
|
|
|
|
gocritic:
|
|
disabled-checks:
|
|
- ifElseChain
|
|
|
|
gofumpt:
|
|
module-path: github.com/gofiber/fiber
|
|
extra-rules: true
|
|
|
|
gosec:
|
|
config:
|
|
global:
|
|
audit: true
|
|
|
|
depguard:
|
|
include-go-root: true
|
|
packages:
|
|
- flag
|
|
- io/ioutil
|
|
packages-with-error-message:
|
|
- flag: '`flag` package is only allowed in main.go'
|
|
- io/ioutil: '`io/ioutil` package is deprecated, use the `io` and `os` package instead'
|
|
|
|
govet:
|
|
check-shadowing: true
|
|
enable-all: true
|
|
disable:
|
|
- shadow
|
|
- fieldalignment
|
|
- loopclosure
|
|
|
|
grouper:
|
|
import-require-single-import: true
|
|
import-require-grouping: true
|
|
|
|
misspell:
|
|
locale: US
|
|
|
|
nolintlint:
|
|
require-explanation: true
|
|
require-specific: true
|
|
|
|
nonamedreturns:
|
|
report-error-in-defer: true
|
|
|
|
predeclared:
|
|
q: true
|
|
|
|
promlinter:
|
|
strict: true
|
|
|
|
revive:
|
|
enable-all-rules: true
|
|
rules:
|
|
# Provided by gomnd linter
|
|
- name: add-constant
|
|
disabled: true
|
|
- name: argument-limit
|
|
disabled: true
|
|
# Provided by bidichk
|
|
- name: banned-characters
|
|
disabled: true
|
|
- name: cognitive-complexity
|
|
disabled: true
|
|
- name: cyclomatic
|
|
disabled: true
|
|
- name: early-return
|
|
severity: warning
|
|
disabled: true
|
|
- name: exported
|
|
disabled: true
|
|
- name: file-header
|
|
disabled: true
|
|
- name: function-result-limit
|
|
disabled: true
|
|
- name: function-length
|
|
disabled: true
|
|
- name: line-length-limit
|
|
disabled: true
|
|
- name: max-public-structs
|
|
disabled: true
|
|
- name: modifies-parameter
|
|
disabled: true
|
|
- name: nested-structs
|
|
disabled: true
|
|
- name: package-comments
|
|
disabled: true
|
|
|
|
stylecheck:
|
|
checks:
|
|
- all
|
|
- -ST1000
|
|
- -ST1020
|
|
- -ST1021
|
|
- -ST1022
|
|
|
|
tagliatelle:
|
|
case:
|
|
rules:
|
|
json: snake
|
|
|
|
tenv:
|
|
all: true
|
|
|
|
#unparam:
|
|
# check-exported: true
|
|
|
|
wrapcheck:
|
|
ignorePackageGlobs:
|
|
- github.com/gofiber/fiber/*
|
|
- github.com/valyala/fasthttp
|
|
|
|
issues:
|
|
exclude-use-default: false
|
|
|
|
linters:
|
|
enable:
|
|
- asasalint
|
|
- asciicheck
|
|
- bidichk
|
|
- bodyclose
|
|
- containedctx
|
|
- contextcheck
|
|
- depguard
|
|
- dogsled
|
|
- durationcheck
|
|
- errcheck
|
|
- errchkjson
|
|
- errname
|
|
- errorlint
|
|
- execinquery
|
|
- exhaustive
|
|
- exportloopref
|
|
- forbidigo
|
|
- forcetypeassert
|
|
- goconst
|
|
- gocritic
|
|
- gofmt
|
|
- gofumpt
|
|
- goimports
|
|
- gomoddirectives
|
|
- goprintffuncname
|
|
- gosec
|
|
- gosimple
|
|
- govet
|
|
- grouper
|
|
- loggercheck
|
|
- misspell
|
|
- nakedret
|
|
- nilerr
|
|
- nilnil
|
|
- noctx
|
|
- nolintlint
|
|
- nonamedreturns
|
|
- nosprintfhostport
|
|
- predeclared
|
|
- promlinter
|
|
- reassign
|
|
- revive
|
|
- rowserrcheck
|
|
- sqlclosecheck
|
|
- staticcheck
|
|
- stylecheck
|
|
- tagliatelle
|
|
# - testpackage # TODO: Enable once https://github.com/gofiber/fiber/issues/2252 is implemented
|
|
- thelper
|
|
- tparallel
|
|
- typecheck
|
|
- unconvert
|
|
- unparam
|
|
- unused
|
|
- usestdlibvars
|
|
- wastedassign
|
|
- whitespace
|
|
- wrapcheck
|
|
- tenv
|