This linter is a golang markdown link verifier. The goal of this linter is to verify links mentioned in markdown documentation are working properly, alive and not stale.
This linter is easily used and envoked with MegaLinter as it contains a MegaLinter descriptor.
NOTE: Originally created and currently running on the CSE playbook.
When running only linkcheck:
- By default, the checker will use the configuration linkcheck.json located here.
- We can pass a new configuration file by using
--config PATH
- We can pass a new configuration file by using
- We will be working on the directory the command was running from.
- We can pass files instead by
linkcheck readme.md readme2.md
- We can pass files instead by
- Scan the directory and search for *.md files.
- Open each file and extract links from it.
- Divide the links into one of the categories: Email, Folder, URL.
- Analyze link.
By default, the checker will use the configuration linkcheck.json located here.
go install github.com/shiranr/linkcheck@latest
linkcheck
linkcheck README.md
linkcheck --config linkcheck.json README.MD
Currently, there are several parameters which can be customized, more to come in the future. :) For more details, see linkcheck.json:
- exclude_links - links which we want to skip and the link check to ignore.
- only_errors - true by default - print only errors or all the logs including successful links.
- project_path - ability to scan an entire folder instead of files one by one as a givne list.
- serial - false by default - work parallel (use goroutines) or serializable.