Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

scan-path-standards.py: indented and ~~~ code fences are not skipped, so example code produces path findings #152

Open

Description

@CloneOfAlex

Describe the bug

scan-path-standards.py (both builders) says fenced code blocks are skipped by default (--include-fenced turns scanning them on). But FENCE_RE = re.compile(r'^```', re.MULTILINE) only recognises fences that start at column 0 with backticks. These are not detected:

  • indented fences inside list items (1. Run: followed by ```bash), which is common in step-by-step SKILL.md and reference files;
  • ~~~ fences.

Example code inside them is linted as if it were instructions, producing relative-prefix / absolute-path findings and status: fail. (This is separate from #117, which is about frontmatter keys.)

Steps to reproduce

mkdir -p sk/references && cd sk
printf -- '---\nname: sk\ndescription: x\n---\n# sk\n\n1. Run the example:\n\n   ```bash\n   cat ../other-skill/notes.md\n   ```\n\n2. Done.\n' > SKILL.md
printf '~~~bash\ncp ~/.config/x ../y\n~~~\n' > references/r.md
python3 <bmb>/skills/bmad-workflow-builder/scripts/scan-path-standards.py .
# fail
#  SKILL.md 10 relative-prefix  Parent directory reference (../) found
#  references/r.md 2 absolute-path  Home directory path (~/) found
#  references/r.md 2 relative-prefix  Parent directory reference (../) found

Expected behavior

Detect fences per CommonMark: up to 3 spaces of indent (more inside list items), backtick or tilde fences, and a closing fence that matches the opening character and is at least as long. Precompute fenced line ranges once instead of re-counting fences for every match (is_in_fenced_block is currently O(n²) per file).

Environment

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions