Add support for Markdownlint 0.46.0 format#1353
Merged
pascalberger merged 1 commit intocake-contrib:developfrom Nov 23, 2025
Merged
Add support for Markdownlint 0.46.0 format#1353pascalberger merged 1 commit intocake-contrib:developfrom
pascalberger merged 1 commit intocake-contrib:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for markdownlint-cli 0.46.0, which changed from reporting absolute file paths to relative file paths. The changes update the IsValidRepositoryFilePath method to handle both absolute and relative paths by returning relative paths unchanged, while continuing to validate and convert absolute paths.
Key Changes
- Modified
IsValidRepositoryFilePathto accept and return relative paths without validation - Added test log file for markdownlint-cli 0.46.0 with relative paths
- Added comprehensive unit test for the new format
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Cake.Issues/StringPathExtensions.cs |
Added early return for relative paths in IsValidRepositoryFilePath |
src/Cake.Issues.Markdownlint.Tests/Testfiles/MarkdownlintCliLogFileFormat/markdownlint-cli-0.46.0.log |
Test log file with relative paths matching new format |
src/Cake.Issues.Markdownlint.Tests/LogFileFormat/MarkdownlintCliLogFileFormatTests.cs |
New test method verifying correct parsing of 0.46.0 format |
Comments suppressed due to low confidence (1)
src/Cake.Issues/StringPathExtensions.cs:148
- The parameter documentation states 'Full file path' but the method now accepts both full (absolute) and relative file paths. Update to 'File path (absolute or relative).' or similar to reflect the new behavior.
/// <param name="filePath">Full file path.</param>
eb0a4ea to
54e06cf
Compare
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.
Starting with markdownlint-cli 0.46.0 file paths are reported as relative instead of absolute paths. This PR updates logic to be able to handle absolute and relative paths.