Skip to content
Merged
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
57 changes: 32 additions & 25 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,57 @@
# Refer to golangci-lint's example config file for more options and information:
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
# golangci-lint v2 configuration.
# https://golangci-lint.run/docs/configuration/file/

version: 2
version: "2"

run:
timeout: 5m
modules-download-mode: readonly

linters:
enable:
- errcheck
- errname
- govet
- ineffassign
- prealloc
- predeclared
- revive
- staticcheck
- unused

settings:
revive:
# Named rules, not the whole set: these are conventions Go itself
# has an opinion about. Rules that report a threshold are left out.
rules:
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: increment-decrement
- name: indent-error-flow
- name: range
- name: receiver-naming
- name: superfluous-else
- name: time-naming
- name: unused-parameter
- name: var-naming

exclusions:
paths:
- ui/node_modules
rules:
- linters:
- revive
path: internal/api/
text: "var-naming: avoid meaningless package names"
- linters:
- revive
path: internal/exec/
text: "var-naming: avoid package names that conflict with Go standard library package names"
- linters:
- revive
path: internal/api/metrics/
text: "var-naming: avoid package names that conflict with Go standard library package names"
# Go shipped inside a JS package. Not ours, and not tracked in git.
- node_modules
presets:
- comments
- std-error-handling

formatters:
enable:
- gofmt
- goimports

linters-settings:
revive:
enable-all-rules: true

issues:
exclude-use-default: false
# Defaults truncate: 50 findings per linter, and one per line.
max-issues-per-linter: 0
max-same-issues: 0
exclude-dirs:
- ./client
uniq-by-line: false
Loading