mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-29 09:32:16 +00:00
a6d10bd5bc
* Copy latest golangci-lint files from Prometheus Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * Use grafana/regexp over stdlib regexp Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * Fix typos in comments Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * Fix goimports complains in import sorting Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * gofumpt all Go files Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * Update naming to comply with revive linter Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * config: Fix error messages to be lower case Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * test/cli: Fix error messages to be lower case Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * .golangci.yaml: Remove obsolete space Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * config: Fix expected victorOps error Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * Use stdlib regexp Signed-off-by: Matthias Loibl <mail@matthiasloibl.com> * Clean up Go modules Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
run:
|
|
deadline: 5m
|
|
skip-files:
|
|
# Skip autogenerated files.
|
|
- ^.*\.(pb|y)\.go$
|
|
|
|
output:
|
|
sort-results: true
|
|
|
|
linters:
|
|
enable:
|
|
- depguard
|
|
- gofumpt
|
|
- goimports
|
|
- revive
|
|
- misspell
|
|
|
|
issues:
|
|
exclude-rules:
|
|
- path: _test.go
|
|
linters:
|
|
- errcheck
|
|
|
|
linters-settings:
|
|
depguard:
|
|
list-type: blacklist
|
|
include-go-root: true
|
|
packages-with-error-message:
|
|
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
|
|
- github.com/stretchr/testify/assert: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert"
|
|
- github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
|
|
errcheck:
|
|
exclude: scripts/errcheck_excludes.txt
|
|
goimports:
|
|
local-prefixes: github.com/prometheus/alertmanager
|
|
gofumpt:
|
|
extra-rules: true
|
|
revive:
|
|
rules:
|
|
- name: exported
|
|
arguments: ["disableStutteringCheck"]
|
|
- name: blank-imports
|
|
- name: context-as-argument
|
|
- name: dot-imports
|
|
- name: error-return
|
|
- name: error-strings
|
|
- name: error-naming
|
|
- name: if-return
|
|
- name: increment-decrement
|
|
- name: var-naming
|
|
- name: var-declaration
|
|
- name: package-comments
|
|
- name: range
|
|
- name: receiver-naming
|
|
- name: time-naming
|
|
- name: unexported-return
|
|
- name: indent-error-flow
|
|
- name: errorf
|