forked from influxdata/telegraf
-
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.
Run revive linter in CI (influxdata#8798)
* Run revive linter in CI Just output the results, don't fail on it Removed the rule.exported rule * Move revive install to CI * new line * Use golangci-lint * Get v1.37 * increase timeout by a minute * try five minutes * newline missing * Update config
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 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
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,44 @@ | ||
linters: | ||
enable: | ||
- revive | ||
|
||
linters-settings: | ||
revive: | ||
rules: | ||
- name: blank-imports | ||
- name: context-as-argument | ||
- name: context-keys-type | ||
- name: dot-imports | ||
- name: error-return | ||
- name: error-strings | ||
- name: error-naming | ||
- name: exported | ||
- 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 | ||
- name: empty-block | ||
- name: superfluous-else | ||
- name: unused-parameter | ||
- name: unreachable-code | ||
- name: redefines-builtin-id | ||
|
||
run: | ||
skip-dirs: | ||
- scripts | ||
- docs | ||
- etc | ||
skip-files: | ||
- plugins/parsers/influx/machine.go* | ||
|
||
issues: | ||
exclude: | ||
- don't use an underscore in package name | ||
- exported.*should have comment.*or be unexported |
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