123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- # 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
- 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 # TODO: Enable once https://github.com/gofiber/fiber/issues/2254 is implemented
- - typecheck
- - unconvert
- - unparam
- - unused
- - usestdlibvars
- - wastedassign
- - whitespace
- - wrapcheck
|