Skip to content

Commit 2ed00d8

Browse files
repotest: add json linting
Signed-off-by: Patrick Williams <[email protected]> Change-Id: I99dadfac3c2d324bb5ef6a5ab399ad35825b34d5
1 parent 521d8f6 commit 2ed00d8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["plugin:json/recommended-with-comments"]
3+
}

meta-phosphor/scripts/run-repotest

+10-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
188188
meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control.sh
189189
"
190190

191-
types=(shell)
191+
types=(json shell)
192+
# shellcheck disable=SC2034
193+
check_json="eslint --resolve-plugins-relative-to /usr/local/lib/node_modules"
192194
# shellcheck disable=SC2034
193195
check_shell="shellcheck -x"
194196

@@ -215,12 +217,19 @@ for f in $non_bbfiles; do
215217
file_type="shell"
216218
;;
217219

220+
*JSON\ data*)
221+
file_type="json"
222+
;;
223+
218224
*)
219225
case $f in
220226
*.sh)
221227
file_type="shell"
222228
;;
223229

230+
*.json)
231+
file_type="json"
232+
;;
224233
esac
225234
esac
226235

0 commit comments

Comments
 (0)