Skip to content

Commit 928a7d5

Browse files
authored
docs: add version field to configuration sample (#5632)
1 parent 0d86f21 commit 928a7d5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/website/expand_templates/linters.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (e *ExampleSnippetsExtractor) extractExampleSnippets(example []byte) (*Sett
254254

255255
for j, node := range root.Content {
256256
switch node.Value {
257-
case "run", "output", keyLinters, keyFormatters, "issues", "severity":
257+
case "run", "output", keyLinters, keyFormatters, "issues", "severity", "version":
258258
default:
259259
continue
260260
}
@@ -280,6 +280,11 @@ func (e *ExampleSnippetsExtractor) extractExampleSnippets(example []byte) (*Sett
280280
},
281281
}
282282

283+
if node.Value == "version" {
284+
node.HeadComment = `See the dedicated "version" documentation section.`
285+
newNode = nextNode
286+
}
287+
283288
globalNode.Content = append(globalNode.Content, node, newNode)
284289

285290
if node.Value == keyLinters || node.Value == keyFormatters {

0 commit comments

Comments
 (0)