Better markdownlint rule messages and testing#3
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.gitignore, Makefile, package.json)python-tests.yml,rule-unit-tests.yml)Documentation
Rules
Testing
expected_errors.yml; update markdown fixtures; merge/remove heading-like variant fixtureverify_markdownlint_fixtures.py, unit tests,message_contains, requirements-lint.txt)