Skip to content

Commit

Permalink
repotest: add json linting
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Williams <[email protected]>
Change-Id: I99dadfac3c2d324bb5ef6a5ab399ad35825b34d5
  • Loading branch information
williamspatrick committed Nov 3, 2021
1 parent 521d8f6 commit 2ed00d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["plugin:json/recommended-with-comments"]
}
11 changes: 10 additions & 1 deletion meta-phosphor/scripts/run-repotest
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control.sh
"

types=(shell)
types=(json shell)
# shellcheck disable=SC2034
check_json="eslint --resolve-plugins-relative-to /usr/local/lib/node_modules"
# shellcheck disable=SC2034
check_shell="shellcheck -x"

Expand All @@ -215,12 +217,19 @@ for f in $non_bbfiles; do
file_type="shell"
;;

*JSON\ data*)
file_type="json"
;;

*)
case $f in
*.sh)
file_type="shell"
;;

*.json)
file_type="json"
;;
esac
esac

Expand Down

0 comments on commit 2ed00d8

Please sign in to comment.