feat: jsonnetlint job
What
- Add a new job for
jsonnet-lintto lint all jsonnet files - Add pre-commit for
jsonnet-lint
Why
A human shouldn't be catching issues like https://ops.gitlab.net/gitlab-com/gl-infra/cells/topology-service-deployer/-/merge_requests/80#note_405253 for unused variables.
Currently, the linter only checks for unused variables, but more rules can be added in the future.
Testing
Checking that the image does have jsonnet-lint binary installed:
$ docker run -it --entrypoint=/bin/sh registry.gitlab.com/gitlab-com/gl-infra/common-ci-tasks-images/go-jsonnet:0.21.0
/ # which jsonnet-lint
/usr/bin/jsonnet-lint
Edited by Steve Xuereb