linkvalidity

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package linkvalidity implements MDS062, which flags links that silently do not work: the reversed (text)[url] form (markdownlint MD011) and links or images whose destination is empty/`#` or whose visible text is empty (markdownlint MD042). The reversed form is the only autofixable defect — an empty target has no safe replacement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct{}

Rule flags reversed-syntax links and empty links/images. It is default-enabled: both shapes are correctness defects, not style choices.

func (*Rule) Category

func (r *Rule) Category() string

Category implements rule.Rule.

func (*Rule) Check

func (r *Rule) Check(f *lint.File) []lint.Diagnostic

Check implements rule.Rule.

func (*Rule) Fix

func (r *Rule) Fix(f *lint.File) []byte

Fix implements rule.FixableRule. It rewrites every reversed (text)[url] to [text](url); empty links/images have no safe target and are left untouched.

func (*Rule) ID

func (r *Rule) ID() string

ID implements rule.Rule.

func (*Rule) Name

func (r *Rule) Name() string

Name implements rule.Rule.

Jump to

Keyboard shortcuts

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