generated from reviewdog/action-template
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from dbelyaev/feature/apply-patches-and-fixes-…
…from-similar-actions apply patches and fixes from similar actions
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
#!/bin/sh | ||
|
||
command -v reviewdog >/dev/null 2>&1 || { echo >&2 "reviewdog: not found"; exit 1; } | ||
|
||
set -e | ||
|
||
if [ -n "${GITHUB_WORKSPACE}" ] ; then | ||
cd "${GITHUB_WORKSPACE}" || exit | ||
fi | ||
|
||
if [ -n "${INPUT_PROPERTIES_FILE}" ]; then | ||
OPT_PROPERTIES_FILE="-p ${INPUT_PROPERTIES_FILE}" | ||
fi | ||
|
||
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" | ||
|
||
printenv | ||
ls | ||
|
||
# fetch checkstyle of a requested version | ||
echo "Download Checkstyle v${INPUT_CHECKSTYLE_VERSION}" | ||
wget -O - -q "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${INPUT_CHECKSTYLE_VERSION}/checkstyle-${INPUT_CHECKSTYLE_VERSION}-all.jar" > /checkstyle.jar | ||
|
||
exec java -jar /checkstyle.jar -c "${INPUT_CHECKSTYLE_CONFIG}" "${INPUT_WORKDIR}" -f xml \ | ||
echo "Run Checkstyle check" | ||
exec java -jar /checkstyle.jar "${INPUT_WORKDIR}" -c "${INPUT_CHECKSTYLE_CONFIG}" ${OPT_PROPERTIES_FILE} -f xml \ | ||
Check notice on line 25 in entrypoint.sh GitHub Actions / shellcheck[shellcheck] entrypoint.sh#L25 <ShellCheck.SC2086>
Raw output
|
||
| reviewdog -f=checkstyle \ | ||
-name="checkstyle" \ | ||
-reporter="${INPUT_REPORTER:-github-pr-check}" \ | ||
-filter-mode="${INPUT_FILTER_MODE}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
-filter-mode="${INPUT_FILTER_MODE:-added}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR:-false}" \ | ||
-level="${INPUT_LEVEL}" \ | ||
${INPUT_REVIEWDOG_FLAGS} | ||
Check notice on line 32 in entrypoint.sh GitHub Actions / shellcheck[shellcheck] entrypoint.sh#L32 <ShellCheck.SC2086>
Raw output
|