From 99422cea0e2b8e891c94672521ca58293c069388 Mon Sep 17 00:00:00 2001 From: Maya Sergeeva Date: Mon, 18 Apr 2022 14:18:03 +0300 Subject: [PATCH] Updating to 1.45.x version --- .golangci.yml | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index b2a1436..cff7181 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -32,6 +32,7 @@ linters: disable-all: true enable: - asciicheck + - bidichk - bodyclose - cyclop - deadcode @@ -40,6 +41,7 @@ linters: - dupl - durationcheck - errcheck + - errname - errorlint - exhaustive - exportloopref @@ -61,6 +63,7 @@ linters: - gofumpt - goimports - gomnd + - gomoddirectives - goprintffuncname - gosec - gosimple @@ -68,18 +71,22 @@ linters: - 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 @@ -87,6 +94,8 @@ linters: - staticcheck - structcheck - stylecheck # instead of golint + - tagliatelle + - tenv - testpackage - thelper - tparallel @@ -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 " " or " *" for + # variables, or "const " for constants. + ignore-decls: + - c echo.Context + - t testing.T + - f *foo.Bar + - e error + - err error + - i int + - const C issues: exclude: @@ -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"