-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable same linters as the Prometheus repo itself (#1056)
* Add gofumpt to github workflow & fix all files for it Signed-off-by: sazary <soroosh@azary.ir> * Add goimports to golangci & fix it's issues Signed-off-by: sazary <soroosh@azary.ir> * Add revive to golangci & fix it's issues Signed-off-by: sazary <soroosh@azary.ir> * Add errcheck & misspell to golangci and fix their issues Signed-off-by: sazary <soroosh@azary.ir> * Add govet & gosimple to golangci and fix their issues Signed-off-by: sazary <soroosh@azary.ir> * Enable all default linters of golangci Signed-off-by: sazary <soroosh@azary.ir>
- Loading branch information
Showing
39 changed files
with
179 additions
and
146 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,3 +1,4 @@ | ||
--- | ||
name: golangci-lint | ||
on: | ||
push: | ||
|
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,5 +1,31 @@ | ||
# Run only staticcheck for now. Additional linters will be enabled one-by-one. | ||
--- | ||
|
||
run: | ||
deadline: 5m | ||
|
||
output: | ||
sort-results: true | ||
|
||
linters: | ||
enable: | ||
- staticcheck | ||
disable-all: true | ||
- gofumpt | ||
- goimports | ||
- revive | ||
- misspell | ||
|
||
issues: | ||
max-same-issues: 0 | ||
exclude-rules: | ||
- path: _test.go | ||
linters: | ||
- errcheck | ||
- govet | ||
- structcheck | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude: scripts/errcheck_excludes.txt | ||
goimports: | ||
local-prefixes: github.com/prometheus/client_golang | ||
gofumpt: | ||
extra-rules: true |
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.