Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linter: std function unrecognized; skip lint directive? #610

Closed
bwplotka opened this issue May 31, 2022 · 3 comments
Closed

linter: std function unrecognized; skip lint directive? #610

bwplotka opened this issue May 31, 2022 · 3 comments

Comments

@bwplotka
Copy link

bwplotka commented May 31, 2022

Hi,

I think there is some linter problem with std.manifestJsonMinified function.

Code like:

local objects = [{ test: '' }, { bar: 'filter2' }, { bar: 'filter' }, { foo: '' }];

{
  spec: std.sort(objects, std.manifestJsonMinified),
}

Fails the lint with:

test.jsonnet:4:27-51 Indexed object has no field "manifestJsonMinified"

  spec: std.sort(objects, std.manifestJsonMinified),

Blocking: rhobs/configuration#227

On a separate note, is there a way to add some directive that skips false positives?

@sbarzowski
Copy link
Collaborator

On a separate note, is there a way to add some directive that skips false positives?

You mean like for a single line? That would be very useful, but we don't have that yet.

@jaymebrd
Copy link
Contributor

@bwplotka @sbarzowski I put up a PR to fix the linter issue

@sbarzowski
Copy link
Collaborator

The PR was merged. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants