mdsmith
Esc
    v0.52.0 GitHub
    MDS033 structural ready

    MDS033: directory-structure

    Markdown files must exist only in explicitly allowed directories.

    # Settings

    KeyTypeDescription
    allowedlistGlob patterns for allowed directories

    Patterns are matched against the full file path using forward slashes. Use ** to match nested directories (e.g., docs/** allows any file under docs/). The special pattern "." allows root-level files only.

    # Config

    Enable with allowed directories:

    rules:
      directory-structure:
        allowed:
          - "docs/**"
          - "plan/**"
          - "."
          - "internal/**/testdata/**"

    Enabling with the mapping form but without allowed emits a config warning:

    directory-structure: rule enabled but no "allowed" patterns configured

    Disable (default):

    rules:
      directory-structure: false

    # Examples

    # Good

    # Allowed file
    
    This file is in an allowed directory.

    # Bad

    # Misplaced file
    
    This file is not in an allowed directory.

    # Meta-Information

    • ID: MDS033
    • Name: directory-structure
    • Status: ready
    • Default: disabled
    • Fixable: no
    • Implementation: source
    • Category: structural