Closed grugnog closed 2 weeks ago
Thank you @grugnog for trying this out.
I identified the issue in your Markdown file at https://github.com/CivicActions/guidebook/blob/master/practice-areas/help-desk/project-support-accessibility-guidelines.md?plain=1#L34 There is an incorrect [
instead of ]
.
content included in [Section 508 of the Rehabilitation Act[(https://www.access-board.gov/ict).
However, Linkspector should handle such cases better. Keep this issue open and I'll try to fix it.
@gaurav-nelson Ahh, thank you! I guess I needed to be a bit more methodical with my testing!
I think error'ing out with a more helpful message would be a fine improvement here :)
I have the same error still on Linkspector v0.3.9.
https://github.com/kaktusztea/km100/actions/runs/9594211671/job/26456291694
Running linkspector with reviewdog đ¶ ...
Error in checking if file #0-bevezet%C5%91-jelz%C5%91k exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #1-karakteralkot%C3%A1s exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #2-h%C3%A1tterek exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #3-k%C3%A9pzetts%C3%A9grendszer exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #4-fort%C3%A9lyok exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #5-trad%C3%ADci%C3%B3k exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #6-harcrendszer-%EF%B8%8F exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #7-t%C3%A1vols%C3%A1gi-harcrendszer- exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #8-psz%C3%AD exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #9-m%C3%A1giarendszer exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #10-papi-m%C3%A1gia-10- exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #11-var%C3%A1zst%C3%A1rgyak--10- exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #12-gy%C3%B3gy%C3%ADt%C3%A1s-gy%C3%B3gyul%C3%A1s exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #13-m%C3%A9regrendszer-m%C3%A9rgek exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #14-%C3%A9rz%C3%A9kel%C3%A9s-%C3%A9szlel%C3%A9s-90 exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file #15-szitu%C3%A1ci%C3%B3k-20 exist! TypeError: Cannot read properties of undefined (reading 'includes')
Error in checking if file start.md#karakteralkot%C3%B3k exist! TypeError: Cannot read properties of undefined (reading 'includes')
reviewdog: failed to unmarshal rdjson (DiagnosticResult): proto: unexpected EOF
Error: Process completed with exit code 1.
The problematic page: https://github.com/kaktusztea/km100/blob/master/md/start.md
The problematic part is a bunch of in-page anchor links which work well (all of them).
[BevezetĆ](#0-bevezet%C5%91-jelz%C5%91k) - [KarakteralkotĂĄs](#1-karakteralkot%C3%A1s)\
[HĂĄtterek](#2-h%C3%A1tterek) - [KĂ©pzettsĂ©grendszer](#3-k%C3%A9pzetts%C3%A9grendszer) - [FortĂ©lyok](#4-fort%C3%A9lyok) - [TradĂciĂłk](#5-trad%C3%ADci%C3%B3k)\
[Harcrendszer](#6-harcrendszer-%EF%B8%8F) - [TĂĄvolsĂĄgi Harcrendszer](#7-t%C3%A1vols%C3%A1gi-harcrendszer-)\
[PszĂ](#8-psz%C3%AD) - [MĂĄgiarendszer](#9-m%C3%A1giarendszer) - [Papi mĂĄgia](#10-papi-m%C3%A1gia-10-) - [VarĂĄzstĂĄrgyak](#11-var%C3%A1zst%C3%A1rgyak--10-)\
[GyĂłgyĂtĂĄs, gyĂłgyulĂĄs](#12-gy%C3%B3gy%C3%ADt%C3%A1s-gy%C3%B3gyul%C3%A1s) - [MĂ©regrendszer, MĂ©rgek](#13-m%C3%A9regrendszer-m%C3%A9rgek) - [ĂrzĂ©kelĂ©s, ĂszlelĂ©s](#14-%C3%A9rz%C3%A9kel%C3%A9s-%C3%A9szlel%C3%A9s-90) - [SzituĂĄciĂłk](#15-szitu%C3%A1ci%C3%B3k-20)
Thank you @kaktusztea I tested that repo locally to confirm that this issue was resolved. However, I see that the GitHub action is still using Linkspector 0.3.7. I've updated the action to use the latest version. If you re-run the workflow it should now only report broken links.
Thanks Gaurav,
it works now very well! It has found many broken anchor links (true positives) and I could fix all of them. Now everything is green đ https://github.com/kaktusztea/km100/actions/runs/9642938190/job/26591839358
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior Get a list of any broken links in the repo
Additional context
I moved all the markdown containing files/directories to a standalone directory to avoid any interactions with other files resulting in this many files:
That resulted in the error above:
I deleted most of the files and it started running fine. I then added them back and removed some directories until it started running:
After that the test completed successfully.
Given this, my hypothesis is that it is probably something to do with the number of files. I couldn't identify a specific file that caused it to fail repeatedly, although it's possible that is a cause also. Let me know if I can help test anything or if you need more info :)
Finally - thanks for working on this project! We have been using markdown-link-check for a long time, but have had to keep increasing the number of exceptions due to site adding CDNs. This looks like it should help a lot with this approach (as well as filtering and reporting checks!).