linkcheck

command
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command linkcheck checks the relative links and #anchors of Markdown files offline: every relative link must name a file or directory that exists, and every anchor into a Markdown file must match one of its headings (GitHub's slug rules, including the -1, -2 suffixes of repeated headings) or an explicit <a name> or id. External URLs (any scheme, or //host) are out of scope.

Links are read from inline links and images, reference definitions and the href, src and srcset attributes of HTML, outside fenced code blocks and code spans.

Usage:

go run ./tools/linkcheck              every tracked Markdown file except testdata
go run ./tools/linkcheck FILE.md ...  the named files

Exit codes: 0 every link resolves, 1 a broken link or anchor (each printed as "file:line: ..."), 2 usage error or an unreadable file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL