Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecreature committed Jul 8, 2024
1 parent c503ee1 commit c4e8325
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,36 +96,28 @@ linters:
- decorder # checks declaration order and count of types, constants, variables and functions
- dogsled # checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
- paralleltest # detects missing usage of t.Parallel() method in your Go test
- tagalign # checks that struct tags are well aligned

## you may want to enable
## may want to enable
# - wrapcheck # checks that errors returned from external packages are wrapped
#- gci # controls golang package import order and makes it always deterministic
#- ginkgolinter # [if you use ginkgo/gomega] enforces standards of using ginkgo and gomega
#- godox # detects FIXME, TODO and other comment keywords
#- goheader # checks is file header matches to pattern
#- inamedparam # [great idea, but too strict, need to ignore a lot of cases by default] reports interfaces with unnamed method parameters
#- interfacebloat # checks the number of methods inside an interface
#- ireturn # accept interfaces, return concrete types
#- tagalign # checks that struct tags are well aligned
#- varnamelen # [great idea, but too many false positives] checks that the length of a variable's name matches its scope
#- wrapcheck # checks that errors returned from external packages are wrapped
#- zerologlint # detects the wrong usage of zerolog that a user forgets to dispatch zerolog.Event
# - ireturn # accept interfaces, return concrete types
# - varnamelen # [great idea, but too many false positives] checks that the length of a variable's name matches its scope
# - nlreturn # checks for a new line before return and branch statements to increase code clarity

## disabled
# - lll # reports long lines
# - exhaustruct # [highly recommend to enable] checks if all structure fields are initializedgolangci
#- depguard # [replaced by gomodguard] checks if package imports are in a list of acceptable packages
#- dupword # [useless without config] checks for duplicate words in the source code
#- errchkjson # [don't see profit + I'm against of omitting errors like in the first example https://github.com/breml/errchkjson] checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted
#- forcetypeassert # [replaced by errcheck] finds forced type assertions
# - exhaustruct # checks if all structure fields are initialized
#- goerr113 # [too strict] checks the errors handling expressions
#- gofmt # [replaced by goimports] checks whether code was gofmt-ed
#- gofumpt # [replaced by goimports, gofumports is not available yet] checks whether code was gofumpt-ed
#- gosmopolitan # reports certain i18n/l10n anti-patterns in your Go codebase
#- grouper # analyzes expression groups
#- importas # enforces consistent import aliases
#- maintidx # measures the maintainability index of each function
#- wsl # [too strict and mostly code is not more readable] whitespace linter forces you to use empty lines
#- tagliatelle # checks the struct tags
#- contextcheck # Check whether the function uses a non-inherited context.

Expand Down

0 comments on commit c4e8325

Please sign in to comment.