Skip to content

Commit 4845ce1

Browse files
committed
Remove obsolete filtering from setComment
This reverts the change that we made in 3b85307, it is no longer needed now.
1 parent 0cc6e39 commit 4845ce1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pkg/jsonschema/generate_config_docs.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,13 @@ func prepareMarshalledConfig(buffer bytes.Buffer) []byte {
7777
}
7878

7979
func setComment(yamlNode *yaml.Node, description string) {
80-
// Filter out lines containing "[dev]"; this allows us to add developer
81-
// documentation to properties that don't get included in the docs
82-
lines := strings.Split(description, "\n")
83-
lines = lo.Filter(lines, func(s string, _ int) bool {
84-
return !strings.Contains(s, "[dev]")
85-
})
86-
8780
// Workaround for the way yaml formats the HeadComment if it contains
8881
// blank lines: it renders these without a leading "#", but we want a
8982
// leading "#" even on blank lines. However, yaml respects it if the
9083
// HeadComment already contains a leading "#", so we prefix all lines
9184
// (including blank ones) with "#".
9285
yamlNode.HeadComment = strings.Join(
93-
lo.Map(lines, func(s string, _ int) string {
86+
lo.Map(strings.Split(description, "\n"), func(s string, _ int) string {
9487
if s == "" {
9588
return "#" // avoid trailing space on blank lines
9689
}

0 commit comments

Comments
 (0)