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

Remove always failing linter #136

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 1 addition & 38 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
workflow_dispatch:

jobs:
render-lint-dashboards:
render-dashboards:
runs-on: ubuntu-22.04

strategy:
Expand All @@ -48,40 +48,3 @@ jobs:
do
jsonnet -J vendor --output-file rendered-dashboards/`basename $file` $file
done

- name: Install dashboard-linter
run: |
go install github.com/grafana/dashboard-linter@latest
echo "$HOME/go/bin" >> "$GITHUB_PATH"

- name: dashboard-linter rules
run: |
echo "Available rules are documented in https://github.com/grafana/dashboard-linter/blob/main/docs/index.md#rules"
echo ""
dashboard-linter rules

- name: dashboard-linter lint
run: |
lint_failures=""

dashboard_folders=rendered-dashboards
for file in `find $dashboard_folders -name '*.jsonnet'`
do
lint_fail=""
echo "::group::$file"
dashboard-linter lint --strict $file || lint_fail=1
echo "::endgroup::"
if [ -n "$lint_fail" ]; then
lint_failures="$lint_failures $file";
fi
done

if [ -n "$lint_failures" ]; then
echo ""
echo "dashboard-linter errored for:"
for file in $lint_failures
do
echo `basename $file`
done
exit 1
fi