From 4f4784fd410c5e3a62c2f8ce2b0cc542c28aac8b Mon Sep 17 00:00:00 2001 From: assignUser Date: Mon, 17 Aug 2020 13:30:39 +0000 Subject: [PATCH] fix displayed lintr command --- lib/linter.sh | 2 +- lib/worker.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 9cd7c3b8..11a85b55 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1708,7 +1708,7 @@ if [ "${VALIDATE_R}" == "true" ]; then # Lint the R files # ###################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "R" "lintr" "${R_LINTER_RULES}" ".*\.\(r\|R\|Rmd\|rmd\)\$" "${FILE_ARRAY_R[@]}" + LintCodebase "R" "lintr" "lintr::lint('$File') ".*\.\(r\|R\|Rmd\|rmd\)\$" "${FILE_ARRAY_R[@]}" fi ################ diff --git a/lib/worker.sh b/lib/worker.sh index 8749a39f..43eb8c85 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -214,7 +214,7 @@ function LintCodebase() { # Lint the file with the updated path # ####################################### LINT_CMD=$( - cd "${GITHUB_WORKSPACE}" || exit + cd "${GITHUB_WORKSPACE}/${DIR_NAME}" || exit R --slave -e "errors <- lintr::lint('$FILE');print(errors);quit(save = 'no', status = if (length(errors) > 0) 1 else 0)" 2>&1 ) else