Skip to content

test: normalize markdownlint-cli2 version banner in e2e snapshots#164

Merged
zeitlinger merged 3 commits intomainfrom
fix/normalize-tool-version-banners
Apr 13, 2026
Merged

test: normalize markdownlint-cli2 version banner in e2e snapshots#164
zeitlinger merged 3 commits intomainfrom
fix/normalize-tool-version-banners

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

Summary

  • Add normalize_tool_versions to e2e.rs — replaces the markdownlint-cli2 vX.Y.Z (markdownlint vA.B.C) banner with <VERSION> so snapshots don't need updating on every version bump
  • Update markdownlint-cli2/failure snapshot: use <VERSION> placeholder and capture the v0.22.0 format change (error prefix on rule violations)

Unblocks renovate PR #154 (markdownlint-cli2 0.17.2 → 0.22.0).

Test plan

  • CI passes

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>
@zeitlinger zeitlinger marked this pull request as ready for review April 13, 2026 11:41
@zeitlinger zeitlinger requested a review from a team as a code owner April 13, 2026 11:42
Copilot AI review requested due to automatic review settings April 13, 2026 11:42
@zeitlinger zeitlinger enabled auto-merge (squash) April 13, 2026 11:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_versions in tests/e2e.rs and applied it to normalized stdout/stderr for E2E assertions.
  • Updated the markdownlint-cli2/failure snapshot to use a <VERSION> placeholder and reflect the new markdownlint-cli2 output format (error prefix).

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>
@zeitlinger zeitlinger merged commit 0d12fea into main Apr 13, 2026
13 checks passed
@zeitlinger zeitlinger deleted the fix/normalize-tool-version-banners branch April 13, 2026 11:52
This was referenced Apr 16, 2026
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.

3 participants