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 1b8a7da..7596bfd 100644
--- a/src/Cake.Issues.Markdownlint.Tests/Cake.Issues.Markdownlint.Tests.csproj
+++ b/src/Cake.Issues.Markdownlint.Tests/Cake.Issues.Markdownlint.Tests.csproj
@@ -41,10 +41,10 @@
..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll
- ..\packages\Cake.Issues.0.3.0-beta0001\lib\netstandard2.0\Cake.Issues.dll
+ ..\packages\Cake.Issues.0.3.0-beta0002\lib\netstandard2.0\Cake.Issues.dll
- ..\packages\Cake.Issues.Testing.0.3.0-beta0001\lib\netstandard2.0\Cake.Issues.Testing.dll
+ ..\packages\Cake.Issues.Testing.0.3.0-beta0002\lib\netstandard2.0\Cake.Issues.Testing.dll
..\packages\Cake.Testing.0.28.0\lib\net46\Cake.Testing.dll
diff --git a/src/Cake.Issues.Markdownlint.Tests/Markdownlint/MarkdownlintIssuesProviderTests.cs b/src/Cake.Issues.Markdownlint.Tests/Markdownlint/MarkdownlintIssuesProviderTests.cs
index cfeb9a0..9d8a987 100644
--- a/src/Cake.Issues.Markdownlint.Tests/Markdownlint/MarkdownlintIssuesProviderTests.cs
+++ b/src/Cake.Issues.Markdownlint.Tests/Markdownlint/MarkdownlintIssuesProviderTests.cs
@@ -57,7 +57,7 @@ public void Should_Read_Issue_Correct()
3,
"MD010",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md010",
- 0,
+ 300,
"Warning",
"Hard tabs");
CheckIssue(
@@ -66,7 +66,7 @@ public void Should_Read_Issue_Correct()
1,
"MD018",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md018",
- 0,
+ 300,
"Warning",
"No space after hash on atx style header");
CheckIssue(
@@ -75,7 +75,7 @@ public void Should_Read_Issue_Correct()
3,
"MD018",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md018",
- 0,
+ 300,
"Warning",
"No space after hash on atx style header");
}
diff --git a/src/Cake.Issues.Markdownlint.Tests/MarkdownlintCli/MarkdownlintCliIssuesProviderTests.cs b/src/Cake.Issues.Markdownlint.Tests/MarkdownlintCli/MarkdownlintCliIssuesProviderTests.cs
index 0cb9f5e..61d837a 100644
--- a/src/Cake.Issues.Markdownlint.Tests/MarkdownlintCli/MarkdownlintCliIssuesProviderTests.cs
+++ b/src/Cake.Issues.Markdownlint.Tests/MarkdownlintCli/MarkdownlintCliIssuesProviderTests.cs
@@ -57,7 +57,7 @@ public void Should_Read_Issue_Correct_0_8_1()
1,
"MD022",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022",
- 0,
+ 300,
"Warning",
"Headers should be surrounded by blank lines [Context: \"# foo\"]");
CheckIssue(
@@ -66,7 +66,7 @@ public void Should_Read_Issue_Correct_0_8_1()
2,
"MD009",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009",
- 0,
+ 300,
"Warning",
"Trailing spaces [Expected: 2; Actual: 1]");
CheckIssue(
@@ -75,7 +75,7 @@ public void Should_Read_Issue_Correct_0_8_1()
2,
"MD013",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013",
- 0,
+ 300,
"Warning",
"Line length [Expected: 100; Actual: 811]");
CheckIssue(
@@ -84,7 +84,7 @@ public void Should_Read_Issue_Correct_0_8_1()
4,
"MD022",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022",
- 0,
+ 300,
"Warning",
"Headers should be surrounded by blank lines [Context: \"# bar\"]");
CheckIssue(
@@ -93,7 +93,7 @@ public void Should_Read_Issue_Correct_0_8_1()
4,
"MD025",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025",
- 0,
+ 300,
"Warning",
"Multiple top level headers in the same document [Context: \"# bar\"]");
CheckIssue(
@@ -102,7 +102,7 @@ public void Should_Read_Issue_Correct_0_8_1()
5,
"MD031",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031",
- 0,
+ 300,
"Warning",
"Fenced code blocks should be surrounded by blank lines [Context: \"```\"]");
CheckIssue(
@@ -111,7 +111,7 @@ public void Should_Read_Issue_Correct_0_8_1()
5,
"MD040",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md040",
- 0,
+ 300,
"Warning",
"Fenced code blocks should have a language specified [Context: \"```\"]");
CheckIssue(
@@ -120,7 +120,7 @@ public void Should_Read_Issue_Correct_0_8_1()
6,
"MD009",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009",
- 0,
+ 300,
"Warning",
"Trailing spaces [Expected: 2; Actual: 1]");
}
@@ -142,7 +142,7 @@ public void Should_Read_Issue_Correct_0_10_0()
1,
"MD022",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022",
- 0,
+ 300,
"Warning",
"Headings should be surrounded by blank lines [Context: \"# foo\"]");
CheckIssue(
@@ -151,7 +151,7 @@ public void Should_Read_Issue_Correct_0_10_0()
2,
"MD009",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009",
- 0,
+ 300,
"Warning",
"Trailing spaces [Expected: 0 or 2; Actual: 1]");
CheckIssue(
@@ -160,7 +160,7 @@ public void Should_Read_Issue_Correct_0_10_0()
2,
"MD013",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013",
- 0,
+ 300,
"Warning",
"Line length [Expected: 100; Actual: 811]");
CheckIssue(
@@ -169,7 +169,7 @@ public void Should_Read_Issue_Correct_0_10_0()
4,
"MD022",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022",
- 0,
+ 300,
"Warning",
"Headings should be surrounded by blank lines [Context: \"# bar\"]");
CheckIssue(
@@ -178,7 +178,7 @@ public void Should_Read_Issue_Correct_0_10_0()
4,
"MD025",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025",
- 0,
+ 300,
"Warning",
"Multiple top level headings in the same document [Context: \"# bar\"]");
CheckIssue(
@@ -187,7 +187,7 @@ public void Should_Read_Issue_Correct_0_10_0()
5,
"MD031",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031",
- 0,
+ 300,
"Warning",
"Fenced code blocks should be surrounded by blank lines [Context: \"```\"]");
CheckIssue(
@@ -196,7 +196,7 @@ public void Should_Read_Issue_Correct_0_10_0()
5,
"MD040",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md040",
- 0,
+ 300,
"Warning",
"Fenced code blocks should have a language specified [Context: \"```\"]");
CheckIssue(
@@ -205,7 +205,7 @@ public void Should_Read_Issue_Correct_0_10_0()
6,
"MD009",
"https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009",
- 0,
+ 300,
"Warning",
"Trailing spaces [Expected: 0 or 2; Actual: 1]");
}
diff --git a/src/Cake.Issues.Markdownlint.Tests/packages.config b/src/Cake.Issues.Markdownlint.Tests/packages.config
index e0e3585..9463e49 100644
--- a/src/Cake.Issues.Markdownlint.Tests/packages.config
+++ b/src/Cake.Issues.Markdownlint.Tests/packages.config
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/src/Cake.Issues.Markdownlint/Cake.Issues.Markdownlint.csproj b/src/Cake.Issues.Markdownlint/Cake.Issues.Markdownlint.csproj
index 4b9f996..ce79666 100644
--- a/src/Cake.Issues.Markdownlint/Cake.Issues.Markdownlint.csproj
+++ b/src/Cake.Issues.Markdownlint/Cake.Issues.Markdownlint.csproj
@@ -45,7 +45,7 @@
..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll
- ..\packages\Cake.Issues.0.3.0-beta0001\lib\netstandard2.0\Cake.Issues.dll
+ ..\packages\Cake.Issues.0.3.0-beta0002\lib\netstandard2.0\Cake.Issues.dll
..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll
diff --git a/src/Cake.Issues.Markdownlint/Markdownlint/MarkdownlintIssuesProvider.cs b/src/Cake.Issues.Markdownlint/Markdownlint/MarkdownlintIssuesProvider.cs
index 70ed1a6..3303fcd 100644
--- a/src/Cake.Issues.Markdownlint/Markdownlint/MarkdownlintIssuesProvider.cs
+++ b/src/Cake.Issues.Markdownlint/Markdownlint/MarkdownlintIssuesProvider.cs
@@ -41,15 +41,12 @@ from entry in file.Value
let
rule = (string)entry.SelectToken("ruleName")
select
- new Issue(
- this,
- file.Key,
- (int)entry.SelectToken("lineNumber"),
- (string)entry.SelectToken("ruleDescription"),
- 0,
- "Warning",
- rule,
- MarkdownlintRuleUrlResolver.Instance.ResolveRuleUrl(rule));
+ IssueBuilder
+ .NewIssue((string)entry.SelectToken("ruleDescription"), this)
+ .InFile(file.Key, (int)entry.SelectToken("lineNumber"))
+ .WithPriority(IssuePriority.Warning)
+ .OfRule(rule, MarkdownlintRuleUrlResolver.Instance.ResolveRuleUrl(rule))
+ .Create();
}
}
}
diff --git a/src/Cake.Issues.Markdownlint/MarkdownlintCli/MarkdownlintCliIssuesProvider.cs b/src/Cake.Issues.Markdownlint/MarkdownlintCli/MarkdownlintCliIssuesProvider.cs
index 17380c9..7573c5b 100644
--- a/src/Cake.Issues.Markdownlint/MarkdownlintCli/MarkdownlintCliIssuesProvider.cs
+++ b/src/Cake.Issues.Markdownlint/MarkdownlintCli/MarkdownlintCliIssuesProvider.cs
@@ -50,15 +50,12 @@ protected override IEnumerable InternalReadIssues(IssueCommentFormat for
var ruleDescription = groups[5].Value;
yield return
- new Issue(
- this,
- fileName,
- lineNumber,
- ruleDescription,
- 0,
- "Warning",
- rule,
- MarkdownlintRuleUrlResolver.Instance.ResolveRuleUrl(rule));
+ IssueBuilder
+ .NewIssue(ruleDescription, this)
+ .InFile(fileName, lineNumber)
+ .WithPriority(IssuePriority.Warning)
+ .OfRule(rule, MarkdownlintRuleUrlResolver.Instance.ResolveRuleUrl(rule))
+ .Create();
}
}
diff --git a/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.Markdownlint.cs b/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.Markdownlint.cs
index b9ecbdb..1435fa9 100644
--- a/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.Markdownlint.cs
+++ b/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.Markdownlint.cs
@@ -23,7 +23,7 @@ public static string MarkdownlintIssuesProviderTypeName(
{
context.NotNull(nameof(context));
- return Issue.GetProviderTypeName();
+ return typeof(MarkdownlintIssuesProvider).FullName;
}
///
diff --git a/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintCli.cs b/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintCli.cs
index 33858a5..11dfa4b 100644
--- a/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintCli.cs
+++ b/src/Cake.Issues.Markdownlint/MarkdownlintIssuesAliases.MarkdownlintCli.cs
@@ -23,7 +23,7 @@ public static string MarkdownlintCliIssuesProviderTypeName(
{
context.NotNull(nameof(context));
- return Issue.GetProviderTypeName();
+ return typeof(MarkdownlintCliIssuesProvider).FullName;
}
///
diff --git a/src/Cake.Issues.Markdownlint/packages.config b/src/Cake.Issues.Markdownlint/packages.config
index 6580b16..55ad019 100644
--- a/src/Cake.Issues.Markdownlint/packages.config
+++ b/src/Cake.Issues.Markdownlint/packages.config
@@ -1,7 +1,7 @@
-
+