-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add set of requirements for PR and add go linter tools for checking s…
…ecurity, format, simplify... (#443) * Add go lang ci linter for cloudwatchagent * Disable gofmt and go imports * Add binaries with make * Add comments * Add golint and change linter to lint
- Loading branch information
Showing
3 changed files
with
73 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,61 @@ | ||
run: | ||
# The default concurrency value is the number of available CPU. | ||
concurrency: 4 | ||
|
||
# Timeout for analysis, e.g. 30s, 5m, default is 1m | ||
timeout: 20m | ||
|
||
# Exit code when at least one issue was found, default is 1 | ||
issues-exit-code: 1 | ||
|
||
# Include test files or not, default is true | ||
tests: true | ||
|
||
# If invoked with -mod=readonly, the go command is disallowed from the implicit | ||
# automatic updating of go.mod described above. Instead, it fails when any changes | ||
# to go.mod are needed. This setting is most useful to check that go.mod does | ||
# not need updates, such as in a continuous integration and testing system. | ||
modules-download-mode: readonly | ||
|
||
output: | ||
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" | ||
format: colored-line-number | ||
|
||
# print lines of code with issue, default is true | ||
print-issued-lines: true | ||
|
||
# print linter name in the end of issue text, default is true | ||
print-linter-name: true | ||
|
||
# All available settings of specific linters | ||
linters-settings: | ||
revive: | ||
# minimal confidence for issues, default is 0.8 | ||
min-confidence: 0.7 | ||
gofmt: | ||
# Simplify code: gofmt with `-s` option, true by default | ||
simplify: true | ||
goimports: | ||
# Put imports beginning with prefix after 3rd-party packages. | ||
# It's a comma-separated list of prefixes. | ||
local-prefixes: github.com/aws/amazon-cloudwatch-agent | ||
misspell: | ||
# Correct spellings using locale preferences for US or UK. | ||
# Default is to use a neutral variety of English. | ||
# Setting locale to US will correct the British spelling of 'colour' to 'color'. | ||
locale: US | ||
|
||
linters: | ||
disable: | ||
- errcheck | ||
- gofmt | ||
- goimports | ||
enable: | ||
- gosimple | ||
- deadcode | ||
- gosec | ||
- unused | ||
- structcheck | ||
- misspell | ||
- revive | ||
- golint |
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