summaryrefslogtreecommitdiff
path: root/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-xrun_tests.sh41
1 files changed, 12 insertions, 29 deletions
diff --git a/run_tests.sh b/run_tests.sh
index e99af513e..15d1faef8 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -26,8 +26,7 @@ function usage {
echo " -P, --no-pep8 Don't run pep8 by default"
echo " -t, --tabs Check for tab characters in files."
echo " -y, --pylint Just run pylint"
- echo " -j, --jshint Just run jshint"
- echo " -s, --jscs Just run jscs"
+ echo " -e, --eslint Just run eslint"
echo " -k, --karma Just run karma"
echo " -q, --quiet Run non-interactively. (Relatively) quiet."
echo " Implies -V if -N is not set."
@@ -71,8 +70,7 @@ no_pep8=0
just_pylint=0
just_docs=0
just_tabs=0
-just_jscs=0
-just_jshint=0
+just_eslint=0
just_karma=0
never_venv=0
quiet=0
@@ -109,8 +107,7 @@ function process_option {
-8|--pep8-changed) just_pep8_changed=1;;
-P|--no-pep8) no_pep8=1;;
-y|--pylint) just_pylint=1;;
- -j|--jshint) just_jshint=1;;
- -s|--jscs) just_jscs=1;;
+ -e|--eslint) just_eslint=1;;
-k|--karma) just_karma=1;;
-f|--force) force=1;;
-t|--tabs) just_tabs=1;;
@@ -159,21 +156,13 @@ function run_pylint {
fi
}
-function run_jshint {
- echo "Running jshint ..."
- jshint horizon/static/horizon/js
- jshint horizon/static/horizon/tests
- jshint horizon/static/framework/
- jshint openstack_dashboard/static/dashboard/
-}
-
-function run_jscs {
- echo "Running jscs ..."
- if [ "`which jscs`" == '' ] ; then
- echo "jscs is not present; please install, e.g. sudo npm install jscs -g"
+function run_eslint {
+ echo "Running eslint ..."
+ if [ "`which npm`" == '' ] ; then
+ echo "npm is not present; please install, e.g. sudo apt-get install npm"
else
- jscs horizon/static/horizon/js horizon/static/horizon/tests \
- horizon/static/framework/ openstack_dashboard/static/dashboard/
+ npm install
+ npm run lint
fi
}
@@ -583,15 +572,9 @@ if [ $just_pylint -eq 1 ]; then
exit $?
fi
-# Jshint
-if [ $just_jshint -eq 1 ]; then
- run_jshint
- exit $?
-fi
-
-# Jscs
-if [ $just_jscs -eq 1 ]; then
- run_jscs
+# ESLint
+if [ $just_eslint -eq 1 ]; then
+ run_eslint
exit $?
fi