readme: fix typo in sample config.

Should be `max-same-issues`, not `max-same`.

Also adds a trailing newline to files, which is good form, and updates
the generator to handle that cleanly.

Fixes #216.
This commit is contained in:
Diego Pontoriero 2018-10-19 13:50:59 -07:00 committed by Isaev Denis
parent 1759c57577
commit 9f0dcd6e34
4 changed files with 6 additions and 6 deletions

View File

@ -175,7 +175,7 @@ issues:
max-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same: 0
max-same-issues: 0
# Show only new issues: if there are unstaged changes or untracked files,
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
@ -189,4 +189,4 @@ issues:
new-from-rev: REV
# Show only new issues created in git patch with set file path.
new-from-patch: path/to/patch/file
new-from-patch: path/to/patch/file

View File

@ -26,4 +26,4 @@ linters:
disable:
- maligned
- prealloc
- gosec
- gosec

View File

@ -612,7 +612,7 @@ issues:
max-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same: 0
max-same-issues: 0
# Show only new issues: if there are unstaged changes or untracked files,
# only those changes are analyzed, else only changes in HEAD~ are analyzed.

View File

@ -76,8 +76,8 @@ func buildTemplateContext() (map[string]interface{}, error) {
shortHelp := bytes.Join(helpLines[2:], []byte("\n"))
return map[string]interface{}{
"GolangciYaml": string(golangciYaml),
"GolangciYamlExample": string(golangciYamlExample),
"GolangciYaml": strings.TrimSpace(string(golangciYaml)),
"GolangciYamlExample": strings.TrimSpace(string(golangciYamlExample)),
"LintersCommandOutputEnabledOnly": string(lintersOutParts[0]),
"LintersCommandOutputDisabledOnly": string(lintersOutParts[1]),
"EnabledByDefaultLinters": getLintersListMarkdown(true),