Skip to content

Commit 9f0dcd6

Browse files
diegsjirfag
authored andcommitted
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.
1 parent 1759c57 commit 9f0dcd6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.golangci.example.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ issues:
175175
max-per-linter: 0
176176

177177
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
178-
max-same: 0
178+
max-same-issues: 0
179179

180180
# Show only new issues: if there are unstaged changes or untracked files,
181181
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
@@ -189,4 +189,4 @@ issues:
189189
new-from-rev: REV
190190

191191
# Show only new issues created in git patch with set file path.
192-
new-from-patch: path/to/patch/file
192+
new-from-patch: path/to/patch/file

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ linters:
2626
disable:
2727
- maligned
2828
- prealloc
29-
- gosec
29+
- gosec

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ issues:
612612
max-per-linter: 0
613613

614614
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
615-
max-same: 0
615+
max-same-issues: 0
616616

617617
# Show only new issues: if there are unstaged changes or untracked files,
618618
# only those changes are analyzed, else only changes in HEAD~ are analyzed.

scripts/gen_readme/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ func buildTemplateContext() (map[string]interface{}, error) {
7676
shortHelp := bytes.Join(helpLines[2:], []byte("\n"))
7777

7878
return map[string]interface{}{
79-
"GolangciYaml": string(golangciYaml),
80-
"GolangciYamlExample": string(golangciYamlExample),
79+
"GolangciYaml": strings.TrimSpace(string(golangciYaml)),
80+
"GolangciYamlExample": strings.TrimSpace(string(golangciYamlExample)),
8181
"LintersCommandOutputEnabledOnly": string(lintersOutParts[0]),
8282
"LintersCommandOutputDisabledOnly": string(lintersOutParts[1]),
8383
"EnabledByDefaultLinters": getLintersListMarkdown(true),

0 commit comments

Comments
 (0)