linkspector icon indicating copy to clipboard operation
linkspector copied to clipboard

Unexpected token error

Open AlexMRuch opened this issue 7 months ago • 1 comments
trafficstars

I'm trying to have linkspector ignore all urls that reference localhost, but I keep getting this error:

reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token

Here's my .linkspector.yml file, which I based on the example you all give here:

ignorePatterns:
  - pattern: '^https://localhost*$'
useGitIgnore: true

AlexMRuch avatar Apr 15 '25 22:04 AlexMRuch

The issue is that you must specify either 'files' or 'dirs' in your config. PS: https://github.com/UmbrellaDocs/linkspector?tab=readme-ov-file#default-configuration

gaurav-nelson avatar Apr 16 '25 08:04 gaurav-nelson

Just in case, this configuration works perfectly to skip any localhost reference:

aliveStatusCodes:
  - 200
  - 201
  - 204
  - 406
  - 429
dirs:
  - ./
  - docs/
  - src/
  - static/
excludedDirs:
  - .github/
excludedFiles:
  - LICENSE
  - docusaurus.config.js
ignorePatterns:
  - pattern: '^http://localhost.*$'
useGitIgnore: true

Note that it is using http instead of https. But it depends of your local environment.

rmarting avatar Jul 02 '25 11:07 rmarting

@AlexMRuch Can you verify? Please reopen this issue if this is still an issue.

gaurav-nelson avatar Jul 04 '25 02:07 gaurav-nelson