Skip to content

Commit

Permalink
Add a validate statement for local SparkR
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw committed Jul 22, 2015
1 parent 1a03987 commit b1f19ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dev/lint-r.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ if ("lintr" %in% row.names(installed.packages()) == FALSE) {
devtools::install_github("jimhester/lintr")
}

# NOTE: You should install SparkR with `R/install-dev.sh` before running this script.
library(lintr)
library(methods)
library(testthat)
library(SparkR, lib.loc = file.path(SPARK_ROOT_DIR, "R", "lib"))
if (! library(SparkR, lib.loc = file.path(SPARK_ROOT_DIR, "R", "lib"), logical.return = TRUE)) {
stop("You should install SparkR in a local directory with `R/instlal-dev.sh`.")
}

path.to.package <- file.path(SPARK_ROOT_DIR, "R", "pkg")
lint_package(path.to.package, cache = FALSE)

0 comments on commit b1f19ed

Please sign in to comment.