Skip to content

Better markdownlint rule messages and testing#3

Merged
cypher0n3 merged 10 commits into
mainfrom
feat/better_msgs
Feb 8, 2026
Merged

Better markdownlint rule messages and testing#3
cypher0n3 merged 10 commits into
mainfrom
feat/better_msgs

Conversation

@cypher0n3
Copy link
Copy Markdown
Owner

Summary

Improves markdownlint custom rule error messages, adds AP-style and behavior refinements to heading-title-case, and introduces structured fixture expectations with Python verification and CI coverage.

Changes

Project & CI

  • chore: Update project config and dependencies (.gitignore, Makefile, package.json)
  • ci: Add Python tests workflow and rule coverage in CI (CODEOWNERS, python-tests.yml, rule-unit-tests.yml)

Documentation

  • docs: Update READMEs for usage, coverage, and fixtures (main, rules, md_test_files, test-scripts)

Rules

  • feat(markdownlint): Improve rule error messages and heading-title-case
    • Clearer, consistent messages across rules
    • heading-title-case: AP-style, hyphenated segments, colon subphrase, common auxiliaries lowercase, improved range reporting
    • no-heading-like-lines: refined detection

Testing

  • test: Centralize fixture expectations in expected_errors.yml; update markdown fixtures; merge/remove heading-like variant fixture
  • test: Add Python fixture verification and coverage (verify_markdownlint_fixtures.py, unit tests, message_contains, requirements-lint.txt)
  • test: Extend rule unit tests and message_contains checks (all rule test files, project config)

- Extend .gitignore for coverage and Python
- Makefile targets for lint, coverage, and rule tests
- package.json / package-lock.json updates
- CODEOWNERS for workflows and test-scripts
- python-tests.yml: run lint and pytest with coverage
- rule-unit-tests.yml: use test-rules-coverage target
- Main README: VS Code usage, coverage in CI
- Rules README: heading-title-case defaults
- md_test_files and test-scripts READMEs
- Clearer, consistent error messages across rules
- heading-title-case: AP-style, hyphenated segments, colon subphrase,
  common auxiliaries lowercase, improved range reporting
- no-heading-like-lines: refined detection
- Add expected_errors.yml with rule/line/description expectations
- Update markdown fixtures to match improved rule messages
- Merge heading-like cases; remove negative_heading_like_variants.md
- verify_markdownlint_fixtures.py: check fixtures against expected_errors
- test_verify_markdownlint_fixtures.py: unit tests and message_contains
- requirements-lint.txt for test dependencies
- heading-title-case, no-heading-like-lines, and other rule tests
- message_contains assertions for error text
- Project config for rule tests
- Python and markdownlint-tests workflows: install PyYAML so verify script runs.
- package.json: drop quotes around test glob so shell expands it (fixes Node test path in CI).
- test_verify_markdownlint_fixtures: minor docstring and assertion style tweaks.
- heading-title-case: extract getSegmentPosition and checkOneSegment to
  reduce complexity and nesting; getWordRangeInLine and checkOneSegment
  use options objects to satisfy max-params.
- Add eslint-disable for security/detect-non-literal-regexp where
  RegExp is required (allow-custom-anchors config, utils globToRegExp).
- md_test_files/README: describe expected_errors.yml format, remove
  negative_heading_like_variants, reorder fixture table.
- test-scripts/README: verifier uses expected_errors.yml, not embedded blocks.
- .vscode/settings.json: markdownlint custom rule paths for editor.
@cypher0n3 cypher0n3 merged commit 71d2684 into main Feb 8, 2026
9 checks passed
@cypher0n3 cypher0n3 deleted the feat/better_msgs branch February 8, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant