You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "yaooqinn (via GitHub)" <gi...@apache.org> on 2023/09/19 01:47:03 UTC

[GitHub] [spark] yaooqinn commented on a diff in pull request #42982: [SPARK-45202][BUILD] Fix lint-js tool and js format

yaooqinn commented on code in PR #42982:
URL: https://github.com/apache/spark/pull/42982#discussion_r1329459486


##########
dev/lint-js:
##########
@@ -44,8 +44,14 @@ if ! npm ls eslint > /dev/null; then
   npm ci eslint
 fi
 
-npx eslint -c "$SPARK_ROOT_DIR/dev/eslint.json" $LINT_TARGET_FILES | tee "$LINT_JS_REPORT_FILE_NAME"
-lint_status=$?
+declare lint_status=0
+for dir in "${LINT_TARGET_FILES[@]}"; do
+  npx eslint -c "$SPARK_ROOT_DIR/dev/eslint.json" "$dir"
+  status=$?
+  if [ $status -ne 0 ] ; then
+    lint_status=$status
+  fi
+done

Review Comment:
   ```suggestion
   npx eslint -c "$SPARK_ROOT_DIR/dev/eslint.json" ${LINT_TARGET_FILES[@]} | tee "$LINT_JS_REPORT_FILE_NAME"
   lint_status=$?
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org