mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
e61cb7e0db
Add a relatively minimal set of linters that raise safe and mostly un-opinionated issues with the code. It runs automatically on CI via a github action.
42 lines
822 B
YAML
42 lines
822 B
YAML
linters:
|
|
disable-all: true
|
|
enable:
|
|
- deadcode
|
|
- gofmt
|
|
- govet
|
|
- ineffassign
|
|
- revive
|
|
- rowserrcheck
|
|
- sqlclosecheck
|
|
- structcheck
|
|
- typecheck
|
|
- unconvert
|
|
- unused
|
|
|
|
linters-settings:
|
|
gofmt:
|
|
# simplify code: gofmt with `-s` option, true by default
|
|
simplify: false
|
|
|
|
revive:
|
|
ignoreGeneratedHeader: false
|
|
severity: "warning"
|
|
confidence: 0.8
|
|
errorCode: 0
|
|
warningCode: 0
|
|
|
|
rules:
|
|
- name: dot-imports
|
|
- name: error-return
|
|
- name: var-declaration
|
|
- name: package-comments
|
|
- name: range
|
|
- name: receiver-naming
|
|
- name: time-naming
|
|
- name: indent-error-flow
|
|
- name: errorf
|
|
- name: empty-block
|
|
- name: superfluous-else
|
|
- name: unreachable-code
|
|
- name: redefines-builtin-id
|