Skip to content

Commit 86245ed

Browse files
committed
docs: update reference and schema
1 parent 82a2280 commit 86245ed

File tree

2 files changed

+47
-14
lines changed

2 files changed

+47
-14
lines changed

.golangci.next.reference.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,22 @@ run:
5959

6060
# output configuration options
6161
output:
62+
# The formats used to render issues.
6263
# Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity
63-
#
64-
# Multiple can be specified by separating them by comma, output can be provided
65-
# for each of them by separating format name and path by colon symbol.
6664
# Output path can be either `stdout`, `stderr` or path to the file to write to.
67-
# Example: "checkstyle:report.xml,json:stdout,colored-line-number"
65+
#
66+
# For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma.
67+
# The output can be specified for each of them by separating format name and path by colon symbol.
68+
# Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number"
69+
# The CLI flag (`--out-format`) override the configuration file.
6870
#
6971
# Default: colored-line-number
70-
format: json
72+
formats:
73+
- format: json
74+
path: stderr
75+
- format: checkstyle
76+
path: report.xml
77+
- format: colored-line-number
7178

7279
# Print lines of code with issue.
7380
# Default: true

jsonschema/golangci.next.jsonschema.json

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,41 @@
448448
"description": "Output configuration options.",
449449
"type": "object",
450450
"properties": {
451-
"format": {
452-
"description": "Output format to use.",
453-
"pattern": "^(,?(colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity)(:[^,]+)?)+$",
454-
"default": "colored-line-number",
455-
"examples": [
456-
"colored-line-number",
457-
"checkstyle:report.json,colored-line-number",
458-
"line-number:golangci-lint.out,colored-line-number:stdout"
459-
]
451+
"formats": {
452+
"description": "Output formats to use.",
453+
"type": "array",
454+
"items": {
455+
"type": "object",
456+
"additionalProperties": false,
457+
"properties": {
458+
"path": {
459+
"anyOf": [
460+
{
461+
"enum": [ "stdout", "stderr" ]
462+
},
463+
{
464+
"type": "string"
465+
}
466+
]
467+
},
468+
"format": {
469+
"default": "colored-line-number",
470+
"enum": [
471+
"colored-line-number",
472+
"line-number",
473+
"json",
474+
"colored-tab",
475+
"tab",
476+
"checkstyle",
477+
"code-climate",
478+
"junit-xml",
479+
"github-actions",
480+
"teamcity"
481+
]
482+
}
483+
},
484+
"required": ["format"]
485+
}
460486
},
461487
"print-issued-lines": {
462488
"description": "Print lines of code with issue.",

0 commit comments

Comments
 (0)