From 527334883ec74532c2784a748fd4fca521fa8243 Mon Sep 17 00:00:00 2001 From: assignUser Date: Sun, 16 Aug 2020 00:18:31 +0000 Subject: [PATCH] adjust lint command --- lib/linter.sh | 4 ++-- lib/worker.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 8a7efcfa..8eb6f0fb 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -108,8 +108,8 @@ PYTHON_PYLINT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_PYLINT_FILE_NAME} PYTHON_FLAKE8_FILE_NAME="${PYTHON_FLAKE8_CONFIG_FILE:-.flake8}" # Name of the file PYTHON_FLAKE8_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_FLAKE8_FILE_NAME}" # Path to the python lint rules # R Vars -R_FILE_NAME='.lintr' -R_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${R_FILE_NAME}" +R_FILE_NAME='.lintr' # Name of the file +R_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${R_FILE_NAME}" # Path to the R lint rules # Ruby Vars RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # Name of the file RUBY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${RUBY_FILE_NAME}" # Path to the ruby lint rules diff --git a/lib/worker.sh b/lib/worker.sh index c5f25012..ff9c17d4 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -215,7 +215,7 @@ function LintCodebase() { ####################################### LINT_CMD=$( cd "${GITHUB_WORKSPACE}" || exit - R --slave -e "lintr::lint('${DIR_NAME}/$FILE_NAME')" 2>&1 + R --slave -e "errors <- lintr::lint('$FILE');print(errors);quit(save = 'no', status = if (length(errors) > 0) 1 else 0)" 2>&1 ) else ################################