From 73bf1715bc59b5671ddf6c3738afd538331ba6ce Mon Sep 17 00:00:00 2001 From: repo-updater Date: Sat, 9 Dec 2023 21:02:39 +0000 Subject: [PATCH] [repo-updater] push update golangcilint.yml --- .golangci.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 172ea8a..785c8d4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,6 +3,15 @@ run: linters: enable: + - containedctx + - contextcheck + - errchkjson + - durationcheck + - forcetypeassert + - goconst + - makezero + - sloglint + - wastedassign - bodyclose - dogsled - errorlint @@ -15,7 +24,6 @@ linters: - gofumpt - goimports - gosec - - lll - misspell - nakedret - nestif @@ -28,9 +36,18 @@ linters: - unparam linters-settings: - lll: - line-length: 140 - tab-width: 4 + errcheckjson: + # report warning when checking error when not required + check-error-free-encoding: true + # encoding of struct with no exported fields + report-no-exported: true + sloglint: + # only allow attribute style formatting instead of kv + attr-only: true + # only allow static messages + static-msg: true + # arguments on separate lines required + args-on-sep-lines: true nolintlint: # Enable to ensure that nolint directives are all used. Default is true. allow-unused: false @@ -38,13 +55,6 @@ linters-settings: allow-leading-space: false # Enable to require nolint directives to mention the specific linter being suppressed. Default is false. require-specific: true - nestif: - # minimal complexity of if statements to report, 5 by default - min-complexity: 7 - gocognit: - # Minimal code complexity to report - # Default: 30 (but we recommend 10-20) - min-complexity: 32 godot: # List of regexps for excluding particular comment lines from check. exclude: