-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a config file ``.golangci.yaml`` for the lint workflow. It removes the previous arguments passed to golangci-lint in favor of the new configuration file.
- Loading branch information
1 parent
00c975a
commit 609960b
Showing
2 changed files
with
55 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
linters: | ||
# Disable all linters. | ||
# Default: false | ||
disable-all: true | ||
# Enable specific linter | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default | ||
enable: | ||
- errcheck | ||
- staticcheck | ||
- unused | ||
|
||
issues: | ||
exclude-rules: | ||
# exclusions for errcheck | ||
- path: "^.*/log.go$" | ||
text: "globalLogger.Output.*not checked" | ||
linters: | ||
- errcheck | ||
- path: "^.*_test.go$" | ||
text: "release.Render.*not checked" | ||
linters: | ||
- errcheck | ||
- path: "^.*_test.go$" | ||
text: "release.Walk.*not checked" | ||
linters: | ||
- errcheck | ||
- path: "internal/setup/fetch.go" | ||
text: "lockFile.Unlock.*not checked" | ||
linters: | ||
- errcheck | ||
# exclusions for unused | ||
# addDebugCommand is an useful function that may be used later | ||
- path: "cmd/chisel/main.go" | ||
text: "addDebugCommand.*unused" | ||
linters: | ||
- unused | ||
# exclude common (unused) issues from log.go files | ||
- path: "^.*/log.go$" | ||
text: "logf.*unused" | ||
linters: | ||
- unused | ||
- path: "^.*/log.go$" | ||
text: "debugf.*unused" | ||
linters: | ||
- unused | ||
- path: "^.*/log.go$" | ||
text: "globalDebug.*unused" | ||
linters: | ||
- unused | ||
- path: "^.*/log.go$" | ||
text: "globalLogger.*unused" | ||
linters: | ||
- unused | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 |