From 164eee89070ce7f28c3530fd091e2ed6ab1a648c Mon Sep 17 00:00:00 2001 From: Gaurav Date: Mon, 13 May 2024 19:32:02 +1000 Subject: [PATCH] Fix for shellcheck, remove alex and misspel --- .github/workflows/reviewdog.yml | 21 --------------------- .github/workflows/test.yml | 2 -- action.yml | 2 +- script.sh | 4 ++-- testdata/text.md | 4 +++- 5 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index e4766b2..c0a601a 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -37,24 +37,3 @@ jobs: with: reporter: github-check level: warning - - misspell: - name: runner / misspell - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: reviewdog/action-misspell@v1 - with: - reporter: github-check - level: warning - locale: "US" - - alex: - name: runner / alex - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: reviewdog/action-alex@v1 - with: - reporter: github-check - level: warning diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61f6a7f..4a5b221 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,6 @@ jobs: github_token: ${{ secrets.github_token }} reporter: github-pr-check level: error - workdir: ./testdata/subdir/ test-pr-review: if: github.event_name == 'pull_request' @@ -44,7 +43,6 @@ jobs: github_token: ${{ secrets.github_token }} reporter: github-pr-review level: error - filter_mode: file fail_on_error: true - name: check the exit code if: ${{ !success() }} diff --git a/action.yml b/action.yml index 691a38c..a771b4f 100644 --- a/action.yml +++ b/action.yml @@ -11,7 +11,7 @@ inputs: ### Flags for reviewdog ### tool_name: description: 'Tool name to use for reviewdog reporter.' - default: '' + default: 'Linkspector' level: description: 'Report level for reviewdog [info,warning,error].' default: 'error' diff --git a/script.sh b/script.sh index bc7eeeb..f473f3e 100755 --- a/script.sh +++ b/script.sh @@ -13,13 +13,13 @@ echo '::endgroup::' echo '::group:: Running linkspector with reviewdog 🐶 ...' linkspector check -c "${INPUT_CONFIG_FILE}" -j | - reviewdog -efm="%f:%l:%c: %m" \ + reviewdog -f=rdjson \ -name="${INPUT_TOOL_NAME}" \ -reporter="${INPUT_REPORTER}" \ -filter-mode="${INPUT_FILTER_MODE}" \ -fail-on-error="${INPUT_FAIL_ON_ERROR}" \ -level="${INPUT_LEVEL}" \ - ${INPUT_REVIEWDOG_FLAGS} + "${INPUT_REVIEWDOG_FLAGS}" exit_code=$? echo '::endgroup::' exit $exit_code diff --git a/testdata/text.md b/testdata/text.md index 110fb2c..3dd7cef 100644 --- a/testdata/text.md +++ b/testdata/text.md @@ -1,5 +1,7 @@ This is a test file. -It contains a broken link to [another file](testdata/does-not-exist.md). +It contains a broken link [to another file](testdata/does-not-exist.md). And a working hyperlink to [Google](https://www.google.com). + +Updated markdown file. \ No newline at end of file