From 8b810024ac9a154d63ea10e27427eed356c13cca Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Tue, 25 Mar 2025 23:34:55 +0200 Subject: [PATCH] docs: add version field to ConfigurationExample --- scripts/website/expand_templates/linters.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/website/expand_templates/linters.go b/scripts/website/expand_templates/linters.go index 4e4c28c0505b..87a386e4ace0 100644 --- a/scripts/website/expand_templates/linters.go +++ b/scripts/website/expand_templates/linters.go @@ -254,7 +254,7 @@ func (e *ExampleSnippetsExtractor) extractExampleSnippets(example []byte) (*Sett for j, node := range root.Content { switch node.Value { - case "run", "output", keyLinters, keyFormatters, "issues", "severity": + case "run", "output", keyLinters, keyFormatters, "issues", "severity", "version": default: continue } @@ -280,6 +280,11 @@ func (e *ExampleSnippetsExtractor) extractExampleSnippets(example []byte) (*Sett }, } + if node.Value == "version" { + node.HeadComment = `See the dedicated "version" documentation section.` + newNode = nextNode + } + globalNode.Content = append(globalNode.Content, node, newNode) if node.Value == keyLinters || node.Value == keyFormatters {