Skip to content

Add support for Markdownlint 0.46.0 format#1353

Merged
pascalberger merged 1 commit intocake-contrib:developfrom
pascalberger:feature/markdownlint-046
Nov 23, 2025
Merged

Add support for Markdownlint 0.46.0 format#1353
pascalberger merged 1 commit intocake-contrib:developfrom
pascalberger:feature/markdownlint-046

Conversation

@pascalberger
Copy link
Copy Markdown
Member

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.

Copilot AI review requested due to automatic review settings November 23, 2025 16:10
@pascalberger pascalberger requested a review from a team as a code owner November 23, 2025 16:10
Copy link
Copy Markdown

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 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 IsValidRepositoryFilePath to 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>

@pascalberger pascalberger force-pushed the feature/markdownlint-046 branch from eb0a4ea to 54e06cf Compare November 23, 2025 19:40
@pascalberger pascalberger merged commit e13a6d0 into cake-contrib:develop Nov 23, 2025
149 checks passed
@pascalberger pascalberger deleted the feature/markdownlint-046 branch November 23, 2025 19:57
@pascalberger pascalberger added this to the 6.0.0 milestone Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants