test: normalize markdownlint-cli2 version banner in e2e snapshots#164
Merged
zeitlinger merged 3 commits intomainfrom Apr 13, 2026
Merged
test: normalize markdownlint-cli2 version banner in e2e snapshots#164zeitlinger merged 3 commits intomainfrom
zeitlinger merged 3 commits intomainfrom
Conversation
Replace the exact version string with a <VERSION> placeholder so the snapshot doesn't need updating on every markdownlint-cli2 bump. Also update the snapshot for the v0.22.0 output format change that prefixes rule violations with "error ". Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes E2E snapshot outputs by normalizing markdownlint-cli2’s version banner, preventing snapshot churn when the dependency version changes (e.g., via Renovate updates like #154).
Changes:
- Added
normalize_tool_versionsintests/e2e.rsand applied it to normalized stdout/stderr for E2E assertions. - Updated the
markdownlint-cli2/failuresnapshot to use a<VERSION>placeholder and reflect the newmarkdownlint-cli2output format (errorprefix).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/e2e.rs |
Adds a normalization pass that replaces the markdownlint-cli2 version banner with a stable placeholder before snapshot comparison. |
tests/cases/markdownlint-cli2/failure/test.toml |
Updates the expected stderr snapshot to match the normalized banner and the new rule-violation line format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
martincostello
approved these changes
Apr 13, 2026
This was referenced Apr 16, 2026
Closed
Closed
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
normalize_tool_versionstoe2e.rs— replaces themarkdownlint-cli2 vX.Y.Z (markdownlint vA.B.C)banner with<VERSION>so snapshots don't need updating on every version bumpmarkdownlint-cli2/failuresnapshot: use<VERSION>placeholder and capture the v0.22.0 format change (errorprefix on rule violations)Unblocks renovate PR #154 (markdownlint-cli2 0.17.2 → 0.22.0).
Test plan