jsonnet-language-server
jsonnet-language-server copied to clipboard
Lint alway warning when use std.get
When I use std.get, LSP get two warning from lint
local getValue(obj, key) = std.get(obj, key, null);
it always reports Indexed object has no field "get" and Called value must be a function, but it is assumed to be void
Yeah, unfortunately this is the same issue as https://github.com/grafana/tanka/issues/744 The get function is new-ish and it's missing from the linter map: https://github.com/google/go-jsonnet/blob/master/linter/internal/types/stdlib.go#L22-L172
This is fixed in the latest release with the update to go-jsonnet 0.19.1