UmbrellaDocs / action-linkspector

Uncover broken links in your content using Linkspector GitHub action.
MIT License
11 stars 2 forks source link

linkspector + reviewdog not catching broken links #20

Closed brunopgalvao closed 2 weeks ago

brunopgalvao commented 1 month ago

Hello!

I have broken links in my README.md and the linkspector action does not seem to be catching it.

Here is the workflow:

name: Linkspector
on: [push]
jobs:
  check-links:
    name: runner / linkspector
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: List all files (Debugging)
        run: |
          echo "Listing all files to be scanned:"
          ls -R .
      - name: Run linkspector with reviewdog flags
        uses: umbrelladocs/action-linkspector@v1
        with:
          github_token: ${{ secrets.github_token }}
          reporter: github-check  # You can still specify the reporter here
          fail_on_error: true
          config_file: ".github/workflows/.linkspector.yml"

@gaurav-nelson any help here would be appreciated 🙏🏻

gaurav-nelson commented 2 weeks ago

@brunopgalvao Can you share the link for the action run where it didn't catch the broken links?

brunopgalvao commented 2 weeks ago

@brunopgalvao Can you share the link for the action run where it didn't catch the broken links?

Yes:

There are two broken links in the README.md file:

I would like for any push to the main branch to scan the entire repo for broken links.

gaurav-nelson commented 2 weeks ago

I fixed this issue via https://github.com/UmbrellaDocs/action-linkspector/pull/21 Please wait for new release before you run it again. Done 💯

The issue was that Linkspector wasn't installing properly becuase of Node version mismatch.

Screenshot 2024-10-04 at 11 21 30 AM

brunopgalvao commented 2 weeks ago

Okay. Thanks. What do I have to do on my end? It is still not catching:

gaurav-nelson commented 2 weeks ago

I think it is because of your config, when you don't specify filter_mode Reviewdog only lists errors for added files. So maybe add filter-mode: nofilter and fail_on_error: true.

brunopgalvao commented 2 weeks ago

Working!

filter_mode: nofilter
fail_on_error: true

Thanks a million!