diff --git a/linter/internal/types/stdlib.go b/linter/internal/types/stdlib.go index 6548fb21..08279c9d 100644 --- a/linter/internal/types/stdlib.go +++ b/linter/internal/types/stdlib.go @@ -120,7 +120,7 @@ func prepareStdlib(g *typeGraph) { "manifestTomlEx": g.newSimpleFuncType(stringType, "value", "indent"), "manifestJsonEx": g.newSimpleFuncType(stringType, "value", "indent"), "manifestJsonMinified": g.newSimpleFuncType(stringType, "value"), - "manifestYamlDoc": g.newSimpleFuncType(stringType, "value"), + "manifestYamlDoc": g.newFuncType(stringType, []ast.Parameter{required("value"), optional("indent_array_in_object"), optional("quote_keys")}), "manifestYamlStream": g.newSimpleFuncType(stringType, "value"), "manifestXmlJsonml": g.newSimpleFuncType(stringType, "value"), diff --git a/linter/testdata/stdlib_manifestYamlDoc.jsonnet b/linter/testdata/stdlib_manifestYamlDoc.jsonnet new file mode 100644 index 00000000..333cc718 --- /dev/null +++ b/linter/testdata/stdlib_manifestYamlDoc.jsonnet @@ -0,0 +1,3 @@ +std.manifestYamlDoc({ + hello: 'world', +}, indent_array_in_object=false, quote_keys=true) diff --git a/linter/testdata/stdlib_manifestYamlDoc.linter.golden b/linter/testdata/stdlib_manifestYamlDoc.linter.golden new file mode 100644 index 00000000..e69de29b