File: lint-jsonnet.sh

package info (click to toggle)
prometheus-elasticsearch-exporter 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,664 kB
  • sloc: sh: 63; makefile: 37
file content (13 lines) | stat: -rwxr-xr-x 332 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# Run lint on all jsonnet files in the repository
RESULT=0;
for f in $(find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print); do
  # jsonnet fmt -i "$$f"
  echo "Linting ${f}"
  jsonnetfmt -- "${f}" | diff -u "${f}" -
  RESULT=$((RESULT+$?))
done

echo "Linting complete"
exit $RESULT