diff --git a/src/Cake.Issues.Markdownlint.Tests/Cake.Issues.Markdownlint.Tests.csproj b/src/Cake.Issues.Markdownlint.Tests/Cake.Issues.Markdownlint.Tests.csproj index 0f3ddb2..9c5c49d 100644 --- a/src/Cake.Issues.Markdownlint.Tests/Cake.Issues.Markdownlint.Tests.csproj +++ b/src/Cake.Issues.Markdownlint.Tests/Cake.Issues.Markdownlint.Tests.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/Cake.Issues.Markdownlint.Tests/LogFileFormat/MarkdownlintLogFileFormatTests.cs b/src/Cake.Issues.Markdownlint.Tests/LogFileFormat/MarkdownlintV1LogFileFormatTests.cs similarity index 94% rename from src/Cake.Issues.Markdownlint.Tests/LogFileFormat/MarkdownlintLogFileFormatTests.cs rename to src/Cake.Issues.Markdownlint.Tests/LogFileFormat/MarkdownlintV1LogFileFormatTests.cs index 9490c09..1db0863 100644 --- a/src/Cake.Issues.Markdownlint.Tests/LogFileFormat/MarkdownlintLogFileFormatTests.cs +++ b/src/Cake.Issues.Markdownlint.Tests/LogFileFormat/MarkdownlintV1LogFileFormatTests.cs @@ -7,7 +7,7 @@ using Shouldly; using Xunit; - public sealed class MarkdownlintLogFileFormatTests + public sealed class MarkdownlintV1LogFileFormatTests { public sealed class TheCtor { @@ -15,7 +15,7 @@ public sealed class TheCtor public void Should_Throw_If_Log_Is_Null() { // Given / When - var result = Record.Exception(() => new MarkdownlintLogFileFormat(null)); + var result = Record.Exception(() => new MarkdownlintV1LogFileFormat(null)); // Then result.IsArgumentNullException("log"); @@ -28,7 +28,7 @@ public sealed class TheReadIssuesMethod public void Should_Read_Issues_Correct() { // Given - var fixture = new MarkdownlintIssuesProviderFixture("markdownlint.json"); + var fixture = new MarkdownlintIssuesProviderFixture("markdownlint.json"); // When var issues = fixture.ReadIssues().ToList(); diff --git a/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesProviderTests.cs b/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesProviderTests.cs index 585b2cb..2fb6250 100644 --- a/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesProviderTests.cs +++ b/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesProviderTests.cs @@ -21,7 +21,7 @@ public void Should_Throw_If_Log_Is_Null() var result = Record.Exception(() => new MarkdownlintIssuesProvider( log, - new MarkdownlintIssuesSettings("Foo".ToByteArray(), new MarkdownlintLogFileFormat(new FakeLog())))); + new MarkdownlintIssuesSettings("Foo".ToByteArray(), new MarkdownlintV1LogFileFormat(new FakeLog())))); // Then result.IsArgumentNullException("log"); diff --git a/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesSettingsTests.cs b/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesSettingsTests.cs index 2bbd9a7..7eac241 100644 --- a/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesSettingsTests.cs +++ b/src/Cake.Issues.Markdownlint.Tests/MarkdownlintIssuesSettingsTests.cs @@ -18,7 +18,7 @@ public void Should_Throw_If_LogFilePath_Is_Null() { // Given FilePath logFilePath = null; - var format = new MarkdownlintLogFileFormat(new FakeLog()); + var format = new MarkdownlintV1LogFileFormat(new FakeLog()); // When var result = Record.Exception(() => @@ -34,7 +34,7 @@ public void Should_Throw_If_Format_For_LogFilePath_Is_Null() // Given BaseMarkdownlintLogFileFormat format = null; - using (var tempFile = new ResourceTempFile("Cake.Issues.Markdownlint.Tests.Testfiles.MarkdownlintLogFileFormat.markdownlint.json")) + using (var tempFile = new ResourceTempFile("Cake.Issues.Markdownlint.Tests.Testfiles.MarkdownlintV1LogFileFormat.markdownlint.json")) { // When var result = Record.Exception(() => @@ -50,7 +50,7 @@ public void Should_Throw_If_LogFileContent_Is_Null() { // Given byte[] logFileContent = null; - var format = new MarkdownlintLogFileFormat(new FakeLog()); + var format = new MarkdownlintV1LogFileFormat(new FakeLog()); // When var result = Record.Exception(() => @@ -80,7 +80,7 @@ public void Should_Set_LogFileContent() { // Given var logFileContent = "Foo".ToByteArray(); - var format = new MarkdownlintLogFileFormat(new FakeLog()); + var format = new MarkdownlintV1LogFileFormat(new FakeLog()); // When var settings = new MarkdownlintIssuesSettings(logFileContent, format); @@ -94,7 +94,7 @@ public void Should_Set_LogFileContent_If_Empty() { // Given byte[] logFileContent = Array.Empty(); - var format = new MarkdownlintLogFileFormat(new FakeLog()); + var format = new MarkdownlintV1LogFileFormat(new FakeLog()); // When var settings = new MarkdownlintIssuesSettings(logFileContent, format); @@ -107,8 +107,8 @@ public void Should_Set_LogFileContent_If_Empty() public void Should_Set_LogFileContent_From_LogFilePath() { // Given - var format = new MarkdownlintLogFileFormat(new FakeLog()); - using (var tempFile = new ResourceTempFile("Cake.Issues.Markdownlint.Tests.Testfiles.MarkdownlintLogFileFormat.markdownlint.json")) + var format = new MarkdownlintV1LogFileFormat(new FakeLog()); + using (var tempFile = new ResourceTempFile("Cake.Issues.Markdownlint.Tests.Testfiles.MarkdownlintV1LogFileFormat.markdownlint.json")) { // When var settings = new MarkdownlintIssuesSettings(tempFile.FileName, format); diff --git a/src/Cake.Issues.Markdownlint.Tests/Testfiles/MarkdownlintLogFileFormat/markdownlint.json b/src/Cake.Issues.Markdownlint.Tests/Testfiles/MarkdownlintV1LogFileFormat/markdownlint.json similarity index 100% rename from src/Cake.Issues.Markdownlint.Tests/Testfiles/MarkdownlintLogFileFormat/markdownlint.json rename to src/Cake.Issues.Markdownlint.Tests/Testfiles/MarkdownlintV1LogFileFormat/markdownlint.json diff --git a/src/Cake.Issues.Markdownlint/LogFileFormat/MarkdownlintLogFileFormat.cs b/src/Cake.Issues.Markdownlint/LogFileFormat/MarkdownlintV1LogFileFormat.cs similarity index 88% rename from src/Cake.Issues.Markdownlint/LogFileFormat/MarkdownlintLogFileFormat.cs rename to src/Cake.Issues.Markdownlint/LogFileFormat/MarkdownlintV1LogFileFormat.cs index 9095519..3ca07df 100644 --- a/src/Cake.Issues.Markdownlint/LogFileFormat/MarkdownlintLogFileFormat.cs +++ b/src/Cake.Issues.Markdownlint/LogFileFormat/MarkdownlintV1LogFileFormat.cs @@ -7,15 +7,15 @@ using Cake.Core.Diagnostics; /// - /// Logfile format as written by Markdownlint. + /// Logfile format as written by Markdownlint with options.resultVersion set to 1. /// - internal class MarkdownlintLogFileFormat : BaseMarkdownlintLogFileFormat + internal class MarkdownlintV1LogFileFormat : BaseMarkdownlintLogFileFormat { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The Cake log instance. - public MarkdownlintLogFileFormat(ICakeLog log) + public MarkdownlintV1LogFileFormat(ICakeLog log) : base(log) { } diff --git a/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintLogFileFormat.cs b/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintLogFileFormat.cs index 4d5520d..d5e8bc1 100644 --- a/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintLogFileFormat.cs +++ b/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintLogFileFormat.cs @@ -10,18 +10,18 @@ public static partial class MarkdownlintIssuesAliases { /// - /// Gets an instance for the log format as written by Markdownlint. + /// Gets an instance for the log format as written by Markdownlint with options.resultVersion set to 1. /// /// The context. - /// Instance for the Markdownlint log format. + /// Instance for the Markdownlint V1 log format. [CakePropertyAlias] [CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)] - public static BaseMarkdownlintLogFileFormat MarkdownlintLogFileFormat( + public static BaseMarkdownlintLogFileFormat MarkdownlintV1LogFileFormat( this ICakeContext context) { context.NotNull(nameof(context)); - return new MarkdownlintLogFileFormat(context.Log); + return new MarkdownlintV1LogFileFormat(context.Log); } } }