-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(golangci): enable comprehensive linting and update variable initia…
…lization - Add a `.golangci.yaml` configuration file with various linters enabled and specific settings for `gosec` and `perfsprint`. - Change `isTimeout` from being initialized to `true` to being declared as a `bool` variable without an initial value in `plugin.go`. Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Loading branch information
Showing
2 changed files
with
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
run: | ||
timeout: 5m | ||
linters: | ||
enable: | ||
- asciicheck | ||
- durationcheck | ||
- errcheck | ||
- errorlint | ||
- exportloopref | ||
- gci | ||
- gofmt | ||
- goimports | ||
- gosec | ||
- misspell | ||
- nakedret | ||
- nilerr | ||
- nolintlint | ||
- perfsprint | ||
- revive | ||
- usestdlibvars | ||
- wastedassign | ||
|
||
linters-settings: | ||
gosec: | ||
# To select a subset of rules to run. | ||
# Available rules: https://github.com/securego/gosec#available-rules | ||
# Default: [] - means include all rules | ||
includes: | ||
- G102 | ||
- G106 | ||
- G108 | ||
- G109 | ||
- G111 | ||
- G112 | ||
- G201 | ||
- G203 | ||
perfsprint: | ||
err-error: true | ||
errorf: true | ||
int-conversion: true | ||
sprintf1: true | ||
strconcat: 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