Skip to content

feat: upgrade to linkinator 7.4.1 and improve fragment validation error messaging - #219

Merged
JustinBeckwith merged 6 commits into
mainfrom
test-fragment-validation
Oct 31, 2025
Merged

feat: upgrade to linkinator 7.4.1 and improve fragment validation error messaging#219
JustinBeckwith merged 6 commits into
mainfrom
test-fragment-validation

Conversation

@JustinBeckwith

Copy link
Copy Markdown
Owner

Summary

  • Upgraded linkinator from 7.4.0 to 7.4.1 (includes GitHub-style heading ID support for markdown)
  • Enhanced error messaging to clearly show why links fail, especially for fragment validation
  • Added "Reason" column to job summary tables showing specific failure causes
  • Enabled fragment validation in CI workflow

Changes Made

  1. Updated linkinator dependency to v7.4.1
  2. Improved error reporting:
    • Added getFailureReason() helper to extract user-friendly error messages
    • Console output now shows: [200] url - Fragment not found instead of just [200] url
    • Job summary table includes new "Reason" column
  3. Enhanced CI workflow to test fragment validation

Testing

This PR intentionally includes a broken fragment link in the README to demonstrate the new error messaging. The CI should fail and display:

  • Clear "Fragment not found" reason in the error output
  • Improved job summary with reason column

Addresses feedback from #217 where HTTP 200 responses with broken anchors were confusingly reported.

🤖 Generated with Claude Code

JustinBeckwith and others added 6 commits October 30, 2025 19:06
…gment validation

Updated linkinator to version 7.4.1 which includes GitHub-style heading ID support for fragment validation. Enhanced error reporting to show clear reasons when links fail, especially for 200 responses with missing anchors. Now displays specific failure reasons (e.g., "Fragment not found") in both console output and job summary tables.

Addresses feedback from #217 where HTTP 200 responses with broken anchors were confusingly reported.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added a test link with a non-existent anchor (#this-anchor-does-not-exist) to verify the new fragment validation error messaging works correctly in CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Enable checkFragments option in CI workflow to test the new fragment validation error messaging on pull requests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated status code display to show 'x' for fragment validation failures, matching linkinator CLI behavior. This makes it clearer that the failure is due to a missing anchor rather than an HTTP error.

Changes:
- Added isFragmentFailure() helper to detect fragment validation errors
- Added getDisplayStatus() helper to return 'x' for fragment failures
- Updated console output, job summary table, and error messages to use new display status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed the intentional bad fragment link that was added for testing purposes. The PR is now ready for review with all links passing validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@JustinBeckwith
JustinBeckwith merged commit 4b5cba3 into main Oct 31, 2025
4 checks passed
@JustinBeckwith
JustinBeckwith deleted the test-fragment-validation branch October 31, 2025 02:15
This was referenced Jul 22, 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.

2 participants