diff options
author | Yu ISHIKAWA <yuu.ishikawa@gmail.com> | 2015-08-27 19:38:53 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-08-27 19:38:53 -0700 |
commit | 1f90c5e2198bcf49e115d97ec300c17c1be4dcb4 (patch) | |
tree | b94d86d67bddbb4a4a27057a82b43547cf019314 /dev/lint-r | |
parent | 54cda0deb6bebf1470f16ba5bcc6c4fb842bdac1 (diff) | |
download | spark-1f90c5e2198bcf49e115d97ec300c17c1be4dcb4.tar.gz spark-1f90c5e2198bcf49e115d97ec300c17c1be4dcb4.tar.bz2 spark-1f90c5e2198bcf49e115d97ec300c17c1be4dcb4.zip |
[SPARK-8505] [SPARKR] Add settings to kick `lint-r` from `./dev/run-test.py`
JoshRosen we'd like to check the SparkR source code with the `dev/lint-r` script on the Jenkins. I tried to incorporate the script into `dev/run-test.py`. Could you review it when you have time?
shivaram I modified `dev/lint-r` and `dev/lint-r.R` to install lintr package into a local directory(`R/lib/`) and to exit with a lint status. Could you review it?
- [[SPARK-8505] Add settings to kick `lint-r` from `./dev/run-test.py` - ASF JIRA](https://issues.apache.org/jira/browse/SPARK-8505)
Author: Yu ISHIKAWA <yuu.ishikawa@gmail.com>
Closes #7883 from yu-iskw/SPARK-8505.
Diffstat (limited to 'dev/lint-r')
-rwxr-xr-x | dev/lint-r | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dev/lint-r b/dev/lint-r index 7d5f4cd311..c15d57aad8 100755 --- a/dev/lint-r +++ b/dev/lint-r @@ -28,3 +28,14 @@ if ! type "Rscript" > /dev/null; then fi `which Rscript` --vanilla "$SPARK_ROOT_DIR/dev/lint-r.R" "$SPARK_ROOT_DIR" | tee "$LINT_R_REPORT_FILE_NAME" + +NUM_LINES=`wc -l < "$LINT_R_REPORT_FILE_NAME"` +if [ "$NUM_LINES" = "0" ] ; then + lint_status=0 + echo "lintr checks passed." +else + lint_status=1 + echo "lintr checks failed." +fi + +exit "$lint_status" |