Skip to content

Commit

Permalink
Updating to 1.45.x version
Browse files Browse the repository at this point in the history
  • Loading branch information
Maya Sergeeva committed Apr 18, 2022
1 parent 853c348 commit 99422ce
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ linters:
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- cyclop
- deadcode
Expand All @@ -40,6 +41,7 @@ linters:
- dupl
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- exportloopref
Expand All @@ -61,32 +63,39 @@ linters:
- gofumpt
- goimports
- gomnd
- gomoddirectives
- goprintffuncname
- gosec
- gosimple
- govet
- ifshort
- importas
- ineffassign
- interfacer
- lll
- makezero
- maligned
- nakedret
- nestif
- nilassign
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- paralleltest
- prealloc
- predeclared
- promlinter
- revive # instead of golint
- rowserrcheck
- scopelint
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck # instead of golint
- tagliatelle
- tenv
- testpackage
- thelper
- tparallel
Expand Down Expand Up @@ -151,6 +160,37 @@ linters-settings:
funlen:
lines: 100
statements: 50
varnamelen:
# The longest distance, in source lines, that is being considered a "small scope." (defaults to 5)
# Variables used in at most this many lines will be ignored.
max-distance: 5
# The minimum length of a variable's name that is considered "long." (defaults to 3)
# Variable names that are at least this long will be ignored.
min-name-length: 3
# Check method receiver names. (defaults to false)
check-receiver: false
# Check named return values. (defaults to false)
check-return: false
# Ignore "ok" variables that hold the bool return value of a type assertion. (defaults to false)
ignore-type-assert-ok: ftrue
# Ignore "ok" variables that hold the bool return value of a map index. (defaults to false)
ignore-map-index-ok: true
# Ignore "ok" variables that hold the bool return value of a channel receive. (defaults to false)
ignore-chan-recv-ok: true
# Optional list of variable names that should be ignored completely. (defaults to empty list)
ignore-names:
- err
# Optional list of variable declarations that should be ignored completely. (defaults to empty list)
# Entries must be in the form of "<variable name> <type>" or "<variable name> *<type>" for
# variables, or "const <name>" for constants.
ignore-decls:
- c echo.Context
- t testing.T
- f *foo.Bar
- e error
- err error
- i int
- const C

issues:
exclude:
Expand Down Expand Up @@ -179,6 +219,6 @@ issues:
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.38.x # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.45.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"

0 comments on commit 99422ce

Please sign in to comment.