forked from rusefi/rusefi
-
Notifications
You must be signed in to change notification settings - Fork 0
HOWTO validate links
mi-hol edited this page Dec 15, 2022
·
4 revisions
VS Code introduced a link validator in version 1.72. This seems the best approach while a single file is being edited due to automated "fix all supported markdownlint violations in the document" (see below for more details).
For bulk validation https://github.com/webhintio/markdown-link-validator seems best
- debug mode is extremely helpful for troubleshooting
- it's incredible fast
- should work cross-platform (tried on Windows & WSL Debian)
- https://www.te.com/usa-en/ seems to block or throttle access via an automated script after a certain number of requests
markdown-link-validator:utils:request problem with request: connect ETIMEDOUT 2a01:4f8:221:3b0a:1000:0:19:200:443 - https://www.lammertbies.nl/comm/cable/RS-232.html +21s
markdown-link-validator:utils:request problem with request: read ECONNRESET - https://www.te.com/usa-en/product-4-1437290-1.html +1m
- use exclude list for batch validation, skip all external links
markdown-link-validator . -i https?:\/\/.* --debug >.\wiki-tools\md_link_validation.log
...
Found a total of 1361 links in directory "C:\Users\mholzer\Documents\git\rusefi_documentation":
1298 valid
63 invalid
Time to validate: 1.07s
- would like to have only "invalid" references in output. There is already an enhancement request filed since Aug 2019 :(
- requested to assign committer
- edit output log file to find "invalid" references quickly
- find all strings containing " 0 invalid" (note leading blank) and replace them with "nothing"
- find all strings containing "invalid" => only actually erroneous links with show
https://github.com/chmac/markdown-link-validator/commits/omit-success-output has a quick fix
note: as of 2022-12-13 the method to install: did NOT work for me, trying to get help!!
npm install --save chmac/markdown-link-validator#omit-success-output
to run:
node .\node_modules\markdown-link-validator\dist\src\bin\markdown-link-validator.js . -i https?:\/\/.* --debug
VS Code Extensions "markdownlint" and "Code Spell Checker" have to be installed
![show all rule violations](/Images/DevTools/VS Code - show all violations) ![fix all rule violations](/Images/DevTools/VS Code - fix all violations)
- How to search the Wiki
- Quick Start
- How to ask questions
- Support
- How to create a TunerStudio project
- HOWTOs and FAQs
- rusEFI project overview
- rusEFI Online
- rusEFI virtual simulator
- Fueling
- Multispark
- Cranking
- Electronic Throttle
- Knock Sensing
- Variable Valve Timing
- Lua Scripting
- GDI
- Digital Dash
- rusEFI Hardware Overview
- Wiring & Connectivity Overview
- rusEFI Assembly Completeness Chart
- Kit Instructions
- Hellen Miata 90-95
- Hellen Miata 96-97
- Hellen Miata 99-00
- Hellen Miata 01-05 VVT
- MREAdapter55: from Lada to e30
- Frankenso MazdaMiataNA6 PnP
- Creating a PnP PCB