forked from prometheus/alertmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update golangci-lint and fix complaints (prometheus#2853)
* Copy latest golangci-lint files from Prometheus Signed-off-by: Matthias Loibl <[email protected]> * Use grafana/regexp over stdlib regexp Signed-off-by: Matthias Loibl <[email protected]> * Fix typos in comments Signed-off-by: Matthias Loibl <[email protected]> * Fix goimports complains in import sorting Signed-off-by: Matthias Loibl <[email protected]> * gofumpt all Go files Signed-off-by: Matthias Loibl <[email protected]> * Update naming to comply with revive linter Signed-off-by: Matthias Loibl <[email protected]> * config: Fix error messages to be lower case Signed-off-by: Matthias Loibl <[email protected]> * test/cli: Fix error messages to be lower case Signed-off-by: Matthias Loibl <[email protected]> * .golangci.yaml: Remove obsolete space Signed-off-by: Matthias Loibl <[email protected]> * config: Fix expected victorOps error Signed-off-by: Matthias Loibl <[email protected]> * Use stdlib regexp Signed-off-by: Matthias Loibl <[email protected]> * Clean up Go modules Signed-off-by: Matthias Loibl <[email protected]>
- Loading branch information
1 parent
985c45a
commit a6d10bd
Showing
74 changed files
with
306 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,58 @@ | ||
--- | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.