Skip to content

Commit

Permalink
mgr/dashboard: monitoring: add basic jsonnet linting
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
  • Loading branch information
MrFreezeex committed Nov 23, 2021
1 parent cb7ee7f commit d6978df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions monitoring/ceph-mixin/lint-jsonnet.sh
@@ -0,0 +1,4 @@
#!/bin/sh -e

JSONNETS_FILES=$(find -name '*.jsonnet' -o -name '*.libsonnet')
jsonnetfmt "$@" ${JSONNETS_FILES}
10 changes: 10 additions & 0 deletions monitoring/ceph-mixin/tox.ini
Expand Up @@ -18,6 +18,16 @@ commands =
fix: jsonnet -J vendor -m output/dashboards dashboards.jsonnet
jsonnet -J vendor -S alerts.jsonnet -o output/alerts/ceph_default_alerts.yml

[testenv:jsonnet-lint]
whitelist_externals =
sh
find
jsonnetfmt
description =
Run jsonnet linter
commands =
./lint-jsonnet.sh --test

[testenv:lint]
description =
Run linters
Expand Down

0 comments on commit d6978df

Please sign in to comment.