Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
govet:
check-shadowing: false
nolintlint:
require-explanation: true
require-specific: true

linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- gocritic
- gofmt
- goimports
- gocyclo
- gosec
- gosimple
- govet
- ineffassign
- nolintlint
- nakedret
- prealloc
- predeclared
- revive
- staticcheck
- structcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- varcheck
- whitespace
- goconst
- wsl
- misspell

run:
issues-exit-code: 1
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,16 @@ Whenever you make changes in the interfaces of these use-cases, repositories, or
}
```

### Linter "must have"
[How to](https://golangci-lint.run/usage/install/) install golangci-lint. His project [main](https://golangci-lint.run/) page. Default config [file](.golangci.yml).
Add to IDE:
- Goland [plugin](https://github.com/xxpxxxxp/intellij-plugin-golangci-lint)
- vscode (ctrl+shift+p -> settings.json):
```json
"go.lintTool": "golangci-lint",
```


### TODO

- Improvement based on feedback.
Expand Down