Skip to content

Latest commit

 

History

History
126 lines (90 loc) · 2.22 KB

File metadata and controls

126 lines (90 loc) · 2.22 KB
id MDS027
name cross-file-reference-integrity
status ready
description Links to local files and heading anchors must resolve.

MDS027: cross-file-reference-integrity

Links to local files and heading anchors must resolve.

  • ID: MDS027
  • Name: cross-file-reference-integrity
  • Status: ready
  • Default: enabled, include: [], exclude: [], strict: false
  • Fixable: no
  • Implementation: source
  • Category: link

Settings

Setting Type Default Description
include list [] glob patterns to include
exclude list [] glob patterns to skip
strict bool false check non-Markdown file links

With strict: false, only Markdown targets (.md, .markdown) are checked. External links (http:, https:, mailto:) are always ignored.

Config

rules:
  cross-file-reference-integrity:
    include:
      - "docs/**"
    exclude:
      - "docs/generated/**"
    strict: false

Disable:

rules:
  cross-file-reference-integrity: false

Examples

Good

# Cross File Links

See [guide](good/guide.md#overview).

Jump to the [local section](#local-anchor).

## Local Anchor

Anchor target.

Good -- guide target

# Guide

## Overview

This file is a valid link target.

Bad -- missing file

# Broken File Link

See [guide](bad/missing.md).

Bad -- missing anchor

# Broken Heading Link

See [guide](bad/ref/guide.md#missing-section).

Diagnostics

Condition Message
missing file broken link target "x.md" not found
missing heading broken link target "x.md#section" has no matching heading anchor