Skip to content

Commit b1907ee

Browse files
author
Michael Buchar
committed
ci(jsonlint): add jsonlint formatting checks (#655)
1 parent c8ae299 commit b1907ee

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,20 @@ jobs:
171171
npm install prettier --global
172172
./run-tests.sh --check-prettier
173173
174+
lint-jsonlint:
175+
runs-on: ubuntu-24.04
176+
steps:
177+
- name: Checkout
178+
uses: actions/checkout@v4
179+
180+
- name: Setup Node
181+
uses: actions/setup-node@v4
182+
183+
- name: Lint JSON files
184+
run: |
185+
npm install jsonlint --global
186+
./run-tests.sh --check-jsonlint
187+
174188
docs-sphinx:
175189
runs-on: ubuntu-24.04
176190
steps:

run-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ check_prettier() {
127127
prettier -c .
128128
}
129129

130+
check_jsonlint() {
131+
find . -name "*.json" -exec jsonlint -q {} \+
132+
}
133+
130134
check_pytest() {
131135
clean_old_db_container
132136
start_db_container
@@ -159,6 +163,7 @@ check_all() {
159163
check_yamllint
160164
check_markdownlint
161165
check_prettier
166+
check_jsonlint
162167
}
163168

164169
if [ $# -eq 0 ]; then
@@ -183,5 +188,6 @@ case $arg in
183188
--check-yamllint) check_yamllint ;;
184189
--check-markdownlint) check_markdownlint ;;
185190
--check-prettier) check_prettier ;;
191+
--check-jsonlint) check_jsonlint ;;
186192
*) echo "[ERROR] Invalid argument '$arg'. Exiting." && exit 1 ;;
187193
esac

0 commit comments

Comments
 (0)