feat: add standalone check-links command for external link validation#39
Open
feat: add standalone check-links command for external link validation#39
Conversation
- Add dedicated check-links command optimized for external HTTP/HTTPS links - Support smart retry logic with configurable attempts and delays - Provide multiple output formats: text, JSON, markdown, CSV - Include progress indicators and response time measurements - Add bot-detection handling (ignores 403/999 status codes by default) - Support domain-based grouping and ignore patterns - Implement configurable concurrency for parallel checking - Add comprehensive CLI options for timeout, retries, and formatting Resolves #37: Feature Request: Add standalone command for external link validation
- Add 17 test cases covering all major functionality - Test external link detection and validation - Test retry logic with configurable delays - Test ignore patterns and status code filtering - Test multiple output formats (text, JSON, markdown, CSV) - Test result grouping by file, status, and domain - Test glob pattern file discovery - Test error handling and edge cases - Fix ignore pattern implementation to properly filter before counting - All tests passing with complete coverage of command functionality Enhances PR #39 with proper test coverage
- Replace type coercions with proper type guards - Use proper TypeScript types instead of 'any' - Fix mocking in tests with vi.mocked - Remove non-null assertions with proper null checks - Maintain strict type safety without type coercions
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
Adds a new dedicated
check-linkscommand specifically optimized for external HTTP/HTTPS link validation, addressing the feature request in issue #37.Key Features
🔄 Smart retry logic for temporary failures
⚡ High-performance parallel checking
📊 Multiple output formats
🤖 Bot-detection handling
📈 Progress tracking and statistics
Usage Examples
Implementation Details
src/commands/check-links.tsComparison with existing
validate --check-externalvalidate --check-externalcheck-linksTest Plan
Breaking Changes
None - this is a new command that doesn't affect existing functionality.
Related Issues
Resolves #37: Feature Request: Add standalone command for external link validation