diff options
Diffstat (limited to '.golangci.yml')
-rwxr-xr-x | .golangci.yml | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/.golangci.yml b/.golangci.yml index f623ed70..cde73399 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,20 +5,18 @@ run: skip-dirs: - .github - .git - - tests/mocks - modules-download-mode: readonly allow-parallel-runners: true output: format: colored-line-number # colored-line-number|line-number|json|tab|checkstyle|code-climate linters-settings: + wsl: + allow-assign-and-anything: true govet: check-shadowing: true - revive: - confidence: 0.8 - errorCode: 0 - warningCode: 0 + golint: + min-confidence: 0.1 gocyclo: min-complexity: 15 godot: @@ -49,23 +47,31 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/ - deadcode # Finds unused code - depguard # Go linter that checks if package imports are in a list of acceptable packages - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) + - dupl # Tool for code clone detection - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases + - errorlint # find code that will cause problems with the error wrapping scheme introduced in Go 1.13 - exhaustive # check exhaustiveness of enum switch statements - exportloopref # checks for pointers to enclosing loop variables + - funlen # Tool for detection of long functions + - gochecknoglobals # Checks that no globals are present in Go code - gochecknoinits # Checks that no init functions are present in Go code - gocognit # Computes and checks the cognitive complexity of functions - goconst # Finds repeated strings that could be replaced by a constant - gocritic # The most opinionated Go source code linter + - gocyclo # Computes and checks the cyclomatic complexity of functions - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports - - revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes + - revive - goprintffuncname # Checks that printf-like functions are named with `f` at the end - gosec # Inspects source code for security problems - gosimple # Linter for Go source code that specializes in simplifying a code - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string - ineffassign # Detects when assignments to existing variables are not used + - lll # Reports long lines - misspell # Finds commonly misspelled English words in comments - nakedret # Finds naked returns in functions greater than a specified function length + - nestif # Reports deeply nested if statements + - nlreturn # checks for a new line before return and branch statements to increase code clarity - noctx # finds sending http request without context.Context - nolintlint # Reports ill-formed or insufficient nolint directives - prealloc # Finds slice declarations that could potentially be preallocated @@ -74,10 +80,13 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/ - structcheck # Finds unused struct fields - stylecheck # Stylecheck is a replacement for golint - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes + - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code - unconvert # Remove unnecessary type conversions + - unparam # Reports unused function parameters - unused # Checks Go code for unused constants, variables, functions and types - varcheck # Finds unused global variables and constants - whitespace # Tool for detection of leading and trailing whitespace + - wsl # Whitespace Linter - Forces you to use empty lines! issues: exclude-rules: @@ -87,8 +96,3 @@ issues: - funlen - scopelint - gocognit - - goconst - - noctx - - gosimple - - revive - - gochecknoinits |