Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Update to Cake.Issues 0.3.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Jun 1, 2018
1 parent faf7491 commit 7c5df8a
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
<HintPath>..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll</HintPath>
</Reference>
<Reference Include="Cake.Issues, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.0.3.0-beta0001\lib\netstandard2.0\Cake.Issues.dll</HintPath>
<HintPath>..\packages\Cake.Issues.0.3.0-beta0002\lib\netstandard2.0\Cake.Issues.dll</HintPath>
</Reference>
<Reference Include="Cake.Issues.Testing, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.Testing.0.3.0-beta0001\lib\netstandard2.0\Cake.Issues.Testing.dll</HintPath>
<HintPath>..\packages\Cake.Issues.Testing.0.3.0-beta0002\lib\netstandard2.0\Cake.Issues.Testing.dll</HintPath>
</Reference>
<Reference Include="Cake.Testing, Version=0.28.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Testing.0.28.0\lib\net46\Cake.Testing.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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]");
}
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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]");
}
Expand Down
4 changes: 2 additions & 2 deletions src/Cake.Issues.Markdownlint.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake.Core" version="0.28.0" targetFramework="net461" />
<package id="Cake.Issues" version="0.3.0-beta0001" targetFramework="net461" />
<package id="Cake.Issues.Testing" version="0.3.0-beta0001" targetFramework="net461" />
<package id="Cake.Issues" version="0.3.0-beta0002" targetFramework="net461" />
<package id="Cake.Issues.Testing" version="0.3.0-beta0002" targetFramework="net461" />
<package id="Cake.Testing" version="0.28.0" targetFramework="net461" />
<package id="Shouldly" version="3.0.0" targetFramework="net46" />
<package id="StyleCop.Analyzers" version="1.0.2" targetFramework="net46" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<HintPath>..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll</HintPath>
</Reference>
<Reference Include="Cake.Issues, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.0.3.0-beta0001\lib\netstandard2.0\Cake.Issues.dll</HintPath>
<HintPath>..\packages\Cake.Issues.0.3.0-beta0002\lib\netstandard2.0\Cake.Issues.dll</HintPath>
</Reference>
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,12 @@ from entry in file.Value
let
rule = (string)entry.SelectToken("ruleName")
select
new Issue<MarkdownlintIssuesProvider>(
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();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,12 @@ protected override IEnumerable<IIssue> InternalReadIssues(IssueCommentFormat for
var ruleDescription = groups[5].Value;

yield return
new Issue<MarkdownlintCliIssuesProvider>(
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();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static string MarkdownlintIssuesProviderTypeName(
{
context.NotNull(nameof(context));

return Issue<MarkdownlintIssuesProvider>.GetProviderTypeName();
return typeof(MarkdownlintIssuesProvider).FullName;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static string MarkdownlintCliIssuesProviderTypeName(
{
context.NotNull(nameof(context));

return Issue<MarkdownlintCliIssuesProvider>.GetProviderTypeName();
return typeof(MarkdownlintCliIssuesProvider).FullName;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Issues.Markdownlint/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake.Core" version="0.28.0" targetFramework="net461" />
<package id="Cake.Issues" version="0.3.0-beta0001" targetFramework="net461" />
<package id="Cake.Issues" version="0.3.0-beta0002" targetFramework="net461" />
<package id="Costura.Fody" version="1.6.2" targetFramework="net46" developmentDependency="true" />
<package id="Fody" version="2.1.2" targetFramework="net46" developmentDependency="true" />
<package id="Microsoft.CodeAnalysis.FxCopAnalyzers" version="2.6.0" targetFramework="net461" developmentDependency="true" />
Expand Down

0 comments on commit 7c5df8a

Please sign in to comment.