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