Skip to content

Turn Markdown lint back on #229

Description

@mpaulosky

Markdown lint enforces nothing in this repo today.

  • .markdownlint.json is { "default": false }, which turns off every rule.
  • The Lint Markdown workflow passes it as its config (config: ".markdownlint.json"), so the markdownlint check always passes.
  • markdownlint-cli2 also reads .markdownlint.json when it runs from scripts/gate.sh and the pre-commit hook. The rules in .markdownlint-cli2.jsonc (line length 200; MD033, MD036, MD041 and MD060 off) therefore never apply either.

Size of the gap

Linting with .markdownlint-cli2.jsonc alone, using the workflow's globs, finds 714 violations in 64 files. Most are formatting that markdownlint-cli2 --fix rewrites on its own:

Rule Count
MD022 blanks around headings 252
MD032 blanks around lists 197
MD031 blanks around fences 166
MD034 bare URLs 127
MD013 line length 50
MD012 multiple blank lines 40
MD040 fence language 32
Others (MD026, MD047, MD025, MD029, MD024, ...) fewer than 25 each

The heaviest files are the test guides under docs/guides/, the v0.0.9 release post and docs/reviews/squad-ci-review-issue-17.md.

Proposed fix

  1. Run markdownlint-cli2 --fix over the workflow's globs, then fix the rest by hand (or relax a rule in .markdownlint-cli2.jsonc where the repo's style disagrees).
  2. Delete .markdownlint.json, and point the workflow at .markdownlint-cli2.jsonc (or drop its config: input, since markdownlint-cli2 finds that file itself).
  3. Exclude docs/blogs/** if generated release posts shouldn't be held to the rules, as IssueTracker does.

The CI, gate.sh and pre-commit hook then all enforce the same rules. Found while porting the pre-commit hook for #227.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions