diff --git a/linter/internal/types/stdlib.go b/linter/internal/types/stdlib.go index 659f4e0..42241de 100644 --- a/linter/internal/types/stdlib.go +++ b/linter/internal/types/stdlib.go @@ -108,6 +108,7 @@ func prepareStdlib(g *typeGraph) { "manifestIni": g.newSimpleFuncType(stringType, "ini"), "manifestPython": g.newSimpleFuncType(stringType, "v"), "manifestPythonVars": g.newSimpleFuncType(stringType, "conf"), + "manifestTomlEx": g.newSimpleFuncType(stringType, "value", "indent"), "manifestJsonEx": g.newSimpleFuncType(stringType, "value", "indent"), "manifestYamlDoc": g.newSimpleFuncType(stringType, "value"), "manifestYamlStream": g.newSimpleFuncType(stringType, "value"), diff --git a/testdata/stdlib_smoke_test.golden b/testdata/stdlib_smoke_test.golden index 49c7d51..df9452d 100644 --- a/testdata/stdlib_smoke_test.golden +++ b/testdata/stdlib_smoke_test.golden @@ -108,6 +108,7 @@ "manifestJsonEx": "{\n \"a\": {\n \"b\": \"c\"\n }\n}", "manifestPython": "{\"a\": {\"b\": \"c\"}}", "manifestPythonVars": "a = {\"b\": \"c\"}\n", + "manifestTomlEx": "\n\n[a]\n b = \"c\"", "manifestXmlJsonml": "", "manifestYamlDoc": "\"a\":\n \"b\": \"c\"", "manifestYamlStream": "---\n42\n---\n\"a\":\n \"b\": \"c\"\n...\n", diff --git a/testdata/stdlib_smoke_test.jsonnet b/testdata/stdlib_smoke_test.jsonnet index c2a722c..ca75135 100644 --- a/testdata/stdlib_smoke_test.jsonnet +++ b/testdata/stdlib_smoke_test.jsonnet @@ -93,6 +93,7 @@ manifestIni: std.manifestIni(ini={main: {a: 1, b:2}, sections: {s1: {x: 1, y: 2}}}), manifestPython: std.manifestPython(v={a: {b: "c"}}), manifestPythonVars: std.manifestPythonVars(conf={a: {b: "c"}}), + manifestTomlEx: std.manifestTomlEx(value={a: {b: "c"}}, indent=" "), manifestJsonEx: std.manifestJsonEx(value={a: {b: "c"}}, indent=" "), manifestYamlDoc: std.manifestYamlDoc(value={a: {b: "c"}}), manifestYamlStream: std.manifestYamlStream(value=[42, {a: {b: "c"}}]),