From 9f0dcd6e34137116afd5eb3693d805344a83584e Mon Sep 17 00:00:00 2001 From: Diego Pontoriero Date: Fri, 19 Oct 2018 13:50:59 -0700 Subject: [PATCH] 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. --- .golangci.example.yml | 4 ++-- .golangci.yml | 2 +- README.md | 2 +- scripts/gen_readme/main.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.golangci.example.yml b/.golangci.example.yml index 5f7d5d88..b2296b83 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -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 \ No newline at end of file + new-from-patch: path/to/patch/file diff --git a/.golangci.yml b/.golangci.yml index a3c24c9d..c2b25a59 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,4 +26,4 @@ linters: disable: - maligned - prealloc - - gosec \ No newline at end of file + - gosec diff --git a/README.md b/README.md index 3af9b39d..71bf89f9 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/scripts/gen_readme/main.go b/scripts/gen_readme/main.go index 24d9f168..61070dd9 100644 --- a/scripts/gen_readme/main.go +++ b/scripts/gen_readme/main.go @@ -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),