Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Commit 1d2a970

Browse files
committed
Merge branch 'release/0.6.1'
2 parents d2cca4a + 58d4dcb commit 1d2a970

File tree

10 files changed

+25
-303
lines changed

10 files changed

+25
-303
lines changed

nuspec/nuget/Cake.Issues.Reporting.Generic.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin
2222
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"/>
2323
<copyright>Copyright © Pascal Berger</copyright>
2424
<tags>Cake Script Cake-Issues Cake-ReportFormat Issues Reporting Html Markdown</tags>
25-
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/releases/tag/0.6.0</releaseNotes>
25+
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/releases/tag/0.6.1</releaseNotes>
2626
</metadata>
2727
<files>
2828
<file src="Cake.Issues.Reporting.Generic.dll" target="lib\net46" />

src/Cake.Issues.Reporting.Generic.Tests/Cake.Issues.Reporting.Generic.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
<Reference Include="Cake.Core, Version=0.28.0.0, Culture=neutral, processorArchitecture=MSIL">
4141
<HintPath>..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll</HintPath>
4242
</Reference>
43-
<Reference Include="Cake.Issues, Version=0.6.0.0, Culture=neutral, processorArchitecture=MSIL">
44-
<HintPath>..\packages\Cake.Issues.0.6.0\lib\netstandard2.0\Cake.Issues.dll</HintPath>
43+
<Reference Include="Cake.Issues, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
44+
<HintPath>..\packages\Cake.Issues.0.6.1\lib\netstandard2.0\Cake.Issues.dll</HintPath>
4545
</Reference>
4646
<Reference Include="Cake.Issues.Reporting, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
4747
<HintPath>..\packages\Cake.Issues.Reporting.0.6.0\lib\net46\Cake.Issues.Reporting.dll</HintPath>
4848
</Reference>
49-
<Reference Include="Cake.Issues.Testing, Version=0.6.0.0, Culture=neutral, processorArchitecture=MSIL">
50-
<HintPath>..\packages\Cake.Issues.Testing.0.6.0\lib\netstandard2.0\Cake.Issues.Testing.dll</HintPath>
49+
<Reference Include="Cake.Issues.Testing, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
50+
<HintPath>..\packages\Cake.Issues.Testing.0.6.1\lib\netstandard2.0\Cake.Issues.Testing.dll</HintPath>
5151
</Reference>
5252
<Reference Include="Cake.Testing, Version=0.28.0.0, Culture=neutral, processorArchitecture=MSIL">
5353
<HintPath>..\packages\Cake.Testing.0.28.0\lib\net46\Cake.Testing.dll</HintPath>
@@ -87,7 +87,7 @@
8787
<Compile Include="DevExtremeThemeExtensionsTests.cs" />
8888
<Compile Include="ExceptionAssertExtensions.cs" />
8989
<Compile Include="HtmlDxDataGridColumnDescriptionTests.cs" />
90-
<Compile Include="IIssueExtensionTests.cs" />
90+
<Compile Include="IIssueExtensionsTests.cs" />
9191
<Compile Include="UriExtensionsTests.cs" />
9292
<Compile Include="FileLinkSettingsTests.cs" />
9393
<Compile Include="GenericIssueReportFixture.cs" />

src/Cake.Issues.Reporting.Generic.Tests/IIssueExtensionTests.cs renamed to src/Cake.Issues.Reporting.Generic.Tests/IIssueExtensionsTests.cs

Lines changed: 1 addition & 202 deletions
Original file line numberDiff line numberDiff line change
@@ -2,211 +2,10 @@
22
{
33
using System;
44
using Cake.Issues.Testing;
5-
using Shouldly;
65
using Xunit;
76

8-
public sealed class IIssueExtensionTests
7+
public sealed class IIssueExtensionsTests
98
{
10-
public sealed class TheProjectPathExtension
11-
{
12-
[Fact]
13-
public void Should_Throw_If_Issue_Is_Null()
14-
{
15-
// Given
16-
IIssue issue = null;
17-
18-
// When
19-
var result = Record.Exception(() => issue.ProjectPath());
20-
21-
// Then
22-
result.IsArgumentNullException("issue");
23-
}
24-
25-
[Fact]
26-
public void Should_Return_Full_Path()
27-
{
28-
// Given
29-
var projectPath = @"src\Cake.Issues.Reporting.Generic.Tests\Cake.Issues.Reporting.Generic.Tests.csproj";
30-
var issue =
31-
IssueBuilder
32-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
33-
.InProjectFile(projectPath)
34-
.Create();
35-
36-
// When
37-
var result = issue.ProjectPath();
38-
39-
// Then
40-
result.ShouldBe(@"src/Cake.Issues.Reporting.Generic.Tests/Cake.Issues.Reporting.Generic.Tests.csproj");
41-
}
42-
43-
[Fact]
44-
public void Should_Return_Null_If_Project_Is_Not_Set()
45-
{
46-
// Given
47-
var issue =
48-
IssueBuilder
49-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
50-
.Create();
51-
52-
// When
53-
var result = issue.ProjectPath();
54-
55-
// Then
56-
result.ShouldBeNull();
57-
}
58-
}
59-
60-
public sealed class TheFilePathExtension
61-
{
62-
[Fact]
63-
public void Should_Throw_If_Issue_Is_Null()
64-
{
65-
// Given
66-
IIssue issue = null;
67-
68-
// When
69-
var result = Record.Exception(() => issue.FilePath());
70-
71-
// Then
72-
result.IsArgumentNullException("issue");
73-
}
74-
75-
[Fact]
76-
public void Should_Return_Full_Path()
77-
{
78-
// Given
79-
var filePath = @"src\Cake.Issues.Reporting.Generic.Tests\Foo.cs";
80-
var issue =
81-
IssueBuilder
82-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
83-
.InFile(filePath)
84-
.Create();
85-
86-
// When
87-
var result = issue.FilePath();
88-
89-
// Then
90-
result.ShouldBe(@"src/Cake.Issues.Reporting.Generic.Tests/Foo.cs");
91-
}
92-
93-
[Fact]
94-
public void Should_Return_Null_If_File_Is_Not_Set()
95-
{
96-
// Given
97-
var issue =
98-
IssueBuilder
99-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
100-
.Create();
101-
102-
// When
103-
var result = issue.FilePath();
104-
105-
// Then
106-
result.ShouldBeNull();
107-
}
108-
}
109-
110-
public sealed class TheFileDirectoryExtension
111-
{
112-
[Fact]
113-
public void Should_Throw_If_Issue_Is_Null()
114-
{
115-
// Given
116-
IIssue issue = null;
117-
118-
// When
119-
var result = Record.Exception(() => issue.FileDirectory());
120-
121-
// Then
122-
result.IsArgumentNullException("issue");
123-
}
124-
125-
[Fact]
126-
public void Should_Return_Full_Path()
127-
{
128-
// Given
129-
var filePath = @"src\Cake.Issues.Reporting.Generic.Tests\Foo.cs";
130-
var issue =
131-
IssueBuilder
132-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
133-
.InFile(filePath)
134-
.Create();
135-
136-
// When
137-
var result = issue.FileDirectory();
138-
139-
// Then
140-
result.ShouldBe(@"src/Cake.Issues.Reporting.Generic.Tests");
141-
}
142-
143-
[Fact]
144-
public void Should_Return_Null_If_File_Is_Not_Set()
145-
{
146-
// Given
147-
var issue =
148-
IssueBuilder
149-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
150-
.Create();
151-
152-
// When
153-
var result = issue.FileDirectory();
154-
155-
// Then
156-
result.ShouldBeNull();
157-
}
158-
}
159-
160-
public sealed class TheFileNameExtension
161-
{
162-
[Fact]
163-
public void Should_Throw_If_Issue_Is_Null()
164-
{
165-
// Given
166-
IIssue issue = null;
167-
168-
// When
169-
var result = Record.Exception(() => issue.FileName());
170-
171-
// Then
172-
result.IsArgumentNullException("issue");
173-
}
174-
175-
[Fact]
176-
public void Should_Return_Full_Path()
177-
{
178-
// Given
179-
var filePath = @"src\Cake.Issues.Reporting.Generic.Tests\Foo.cs";
180-
var issue =
181-
IssueBuilder
182-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
183-
.InFile(filePath)
184-
.Create();
185-
186-
// When
187-
var result = issue.FileName();
188-
189-
// Then
190-
result.ShouldBe("Foo.cs");
191-
}
192-
193-
[Fact]
194-
public void Should_Return_Null_If_File_Is_Not_Set()
195-
{
196-
// Given
197-
var issue =
198-
IssueBuilder
199-
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
200-
.Create();
201-
202-
// When
203-
var result = issue.FileName();
204-
205-
// Then
206-
result.ShouldBeNull();
207-
}
208-
}
209-
2109
public sealed class TheGetExpandoObjectExtension
21110
{
21211
[Fact]

src/Cake.Issues.Reporting.Generic.Tests/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Cake.Core" version="0.28.0" targetFramework="net461" />
4-
<package id="Cake.Issues" version="0.6.0" targetFramework="net461" />
4+
<package id="Cake.Issues" version="0.6.1" targetFramework="net461" />
55
<package id="Cake.Issues.Reporting" version="0.6.0" targetFramework="net461" />
6-
<package id="Cake.Issues.Testing" version="0.6.0" targetFramework="net461" />
6+
<package id="Cake.Issues.Testing" version="0.6.1" targetFramework="net461" />
77
<package id="Cake.Testing" version="0.28.0" targetFramework="net461" />
88
<package id="HtmlAgilityPack" version="1.8.7" targetFramework="net461" />
99
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />

src/Cake.Issues.Reporting.Generic/Cake.Issues.Reporting.Generic.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
<Reference Include="Cake.Core, Version=0.28.0.0, Culture=neutral, processorArchitecture=MSIL">
4545
<HintPath>..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll</HintPath>
4646
</Reference>
47-
<Reference Include="Cake.Issues, Version=0.6.0.0, Culture=neutral, processorArchitecture=MSIL">
48-
<HintPath>..\packages\Cake.Issues.0.6.0\lib\netstandard2.0\Cake.Issues.dll</HintPath>
47+
<Reference Include="Cake.Issues, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
48+
<HintPath>..\packages\Cake.Issues.0.6.1\lib\netstandard2.0\Cake.Issues.dll</HintPath>
4949
</Reference>
5050
<Reference Include="Cake.Issues.Reporting, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
5151
<HintPath>..\packages\Cake.Issues.Reporting.0.6.0\lib\net46\Cake.Issues.Reporting.dll</HintPath>
@@ -77,7 +77,7 @@
7777
<Compile Include="GenericIssueReportFormatSettingsExtensions.cs" />
7878
<Compile Include="GenericIssueReportGenerator.cs" />
7979
<Compile Include="GenericIssueReportFormatSettings.cs" />
80-
<Compile Include="IIssueExtension.cs" />
80+
<Compile Include="IIssueExtensions.cs" />
8181
<Compile Include="ReportColumn.cs" />
8282
<Compile Include="UriExtensions.cs" />
8383
<Compile Include="ViewBagHelper.cs" />
@@ -90,7 +90,9 @@
9090
<EmbeddedResource Include="Templates\Diagnostic.cshtml" />
9191
</ItemGroup>
9292
<ItemGroup>
93-
<None Include="packages.config" />
93+
<None Include="packages.config">
94+
<SubType>Designer</SubType>
95+
</None>
9496
<EmbeddedResource Include="Templates\DataTable.cshtml" />
9597
<EmbeddedResource Include="Templates\DxDataGrid.cshtml" />
9698
</ItemGroup>

src/Cake.Issues.Reporting.Generic/FileLinkSettings.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -65,37 +65,5 @@ public static FileLinkSettings TeamFoundationServer(
6565
repositoryUrl.ToString().TrimEnd('/') + "?path=" + rootPath + "{FilePath}&version=GB" + branch + "&line={Line}"
6666
};
6767
}
68-
69-
/// <summary>
70-
/// Returns the file link with all patterns of <see cref="FileLinkPattern"/> replaced
71-
/// by the values of <paramref name="issue"/>.
72-
/// </summary>
73-
/// <param name="issue">Issue whose values should be used to replace the patterns.</param>
74-
/// <returns>File link with all patterns replaced.</returns>
75-
public string GetFileLink(IIssue issue)
76-
{
77-
issue.NotNull(nameof(issue));
78-
79-
if (string.IsNullOrWhiteSpace(this.FileLinkPattern))
80-
{
81-
return null;
82-
}
83-
84-
return
85-
this.FileLinkPattern
86-
.Replace("{ProviderType}", issue.ProviderType)
87-
.Replace("{ProviderName}", issue.ProviderName)
88-
.Replace("{Priority}", issue.Priority?.ToString())
89-
.Replace("{PriorityName}", issue.PriorityName)
90-
.Replace("{ProjectPath}", issue.ProjectPath())
91-
.Replace("{PojectName}", issue.ProjectName)
92-
.Replace("{FilePath}", issue.FilePath())
93-
.Replace("{Path}", issue.FileDirectory())
94-
.Replace("{File}", issue.FileName())
95-
.Replace("{Line}", issue.Line?.ToString())
96-
.Replace("{Rule}", issue.Rule)
97-
.Replace("{RuleUrl}", issue.RuleUrl?.ToString())
98-
.Replace("{Message}", issue.Message);
99-
}
10068
}
10169
}

0 commit comments

Comments
 (0)