Skip to content

Commit 0407800

Browse files
committed
Merge branch 'release/0.8.0'
2 parents dae0efa + 655645e commit 0407800

File tree

66 files changed

+8809
-1272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+8809
-1272
lines changed

.appveyor.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ image: Visual Studio 2017
66
#---------------------------------#
77
# Build Script #
88
#---------------------------------#
9+
install:
10+
# Update to latest NuGet version since we require 5.3.0 for embedded icon
11+
- ps: nuget update -self
12+
913
build_script:
1014
- ps: .\build.ps1 -Target AppVeyor
1115

@@ -27,4 +31,4 @@ branches:
2731
# Build Cache #
2832
#---------------------------------#
2933
cache:
30-
- tools -> setup.cake
34+
- tools -> recipe.cake

3rd-Party-License.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# License overview of included 3rd party code
2+
3+
Cake.Issues is licensed under the terms of the [MIT License](LICENSE).
4+
5+
Cake.Issues includes third-party code which is licensed under its own respective license.
6+
7+
## LitJSON
8+
9+
License: Unlicense
10+
https://github.com/LitJSON/litjson/blob/develop/COPYING

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This addin for the Cake build automation system allows you to read issues from any code analyzer or linter.
44

55
For more information about this addin see the [Cake.Issues website](https://cakeissues.net)
6-
and for general information about the Cake build automation system see the [Cake website](http://cakebuild.net)
6+
and for general information about the Cake build automation system see the [Cake website](http://cakebuild.net).
77

88
[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/cake-contrib/Cake.Issues/blob/develop/LICENSE)
99

@@ -31,7 +31,7 @@ and for general information about the Cake build automation system see the [Cake
3131

3232
## Chat Room
3333

34-
Come join in the conversation about this addin in our Gitter Chat Room
34+
Come join in the conversation about this addin in our Gitter Chat Room.
3535

3636
[![Join the chat at https://gitter.im/cake-contrib/Lobby](https://badges.gitter.im/cake-contrib/Lobby.svg)](https://gitter.im/cake-contrib/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3737

azure-pipelines.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ trigger:
66

77
pr:
88
- develop
9+
- release/*
10+
- hotfix/*
911

1012
jobs:
1113
- job: Windows

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ http://cakebuild.net
3535

3636
[CmdletBinding()]
3737
Param(
38-
[string]$Script = "setup.cake",
38+
[string]$Script = "recipe.cake",
3939
[string]$Target = "Default",
4040
[ValidateSet("Release", "Debug")]
4141
[string]$Configuration = "Release",
@@ -181,4 +181,4 @@ if (!(Test-Path $CAKE_EXE)) {
181181
# Start Cake
182182
Write-Host "Running build script..."
183183
Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
184-
exit $LASTEXITCODE
184+
exit $LASTEXITCODE

build.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ NUGET_EXE=$TOOLS_DIR/nuget.exe
1111
CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe
1212

1313
# Define default arguments.
14-
SCRIPT="setup.cake"
14+
SCRIPT="recipe.cake"
1515
TARGET="Default"
1616
CONFIGURATION="Release"
1717
VERBOSITY="verbose"

nuspec/nuget/Cake.Issues.Testing.nuspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ Common helpers for testing add-ins based on Cake.Issues
1212
</description>
1313
<license type="expression">MIT</license>
1414
<projectUrl>https://cakeissues.net</projectUrl>
15-
<iconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics@a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</iconUrl>
15+
<icon>icon.png</icon>
1616
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1717
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.git"/>
1818
<copyright>Copyright © BBT Software AG and contributors</copyright>
1919
<tags>Cake Script Cake-Issues Issues Testing</tags>
20-
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.7.1</releaseNotes>
20+
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.8.0</releaseNotes>
2121
</metadata>
2222
<files>
23+
<file src="..\..\..\..\nuspec\nuget\icon.png" target="" />
2324
<file src="netstandard2.0\Cake.Issues.Testing.dll" target="lib\netstandard2.0" />
2425
<file src="netstandard2.0\Cake.Issues.Testing.pdb" target="lib\netstandard2.0" />
2526
<file src="netstandard2.0\Cake.Issues.Testing.xml" target="lib\netstandard2.0" />

nuspec/nuget/Cake.Issues.nuspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ See the Project Site for an overview of the whole ecosystem of addins for workin
1919
</description>
2020
<license type="expression">MIT</license>
2121
<projectUrl>https://cakeissues.net</projectUrl>
22-
<iconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics@a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</iconUrl>
22+
<icon>icon.png</icon>
2323
<requireLicenseAcceptance>false</requireLicenseAcceptance>
2424
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.git"/>
2525
<copyright>Copyright © BBT Software AG and contributors</copyright>
2626
<tags>Cake Script Cake-Issues CodeAnalysis Linting Issues</tags>
27-
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.7.1</releaseNotes>
27+
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.8.0</releaseNotes>
2828
</metadata>
2929
<files>
30+
<file src="..\..\..\..\nuspec\nuget\icon.png" target="" />
3031
<file src="netstandard2.0\Cake.Issues.dll" target="lib\netstandard2.0" />
3132
<file src="netstandard2.0\Cake.Issues.pdb" target="lib\netstandard2.0" />
3233
<file src="netstandard2.0\Cake.Issues.xml" target="lib\netstandard2.0" />

nuspec/nuget/icon.png

15.2 KB
Loading

setup.cake renamed to recipe.cake

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@
33
Environment.SetVariableNames();
44

55
BuildParameters.SetParameters(
6-
context: Context,
6+
context: Context,
77
buildSystem: BuildSystem,
88
sourceDirectoryPath: "./src",
99
title: "Cake.Issues",
1010
repositoryOwner: "cake-contrib",
1111
repositoryName: "Cake.Issues",
1212
appVeyorAccountName: "cakecontrib",
13-
shouldRunCodecov: false);
13+
shouldRunCodecov: false,
14+
shouldRunGitVersion: true);
1415

1516
BuildParameters.PrintParameters(Context);
1617

1718
ToolSettings.SetToolSettings(
1819
context: Context,
19-
dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Issues.Tests/*.cs", BuildParameters.RootDirectoryPath + "/src/Cake.Issues*/**/*.AssemblyInfo.cs" },
20-
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Shouldly]*",
20+
dupFinderExcludePattern: new string[]
21+
{
22+
BuildParameters.RootDirectoryPath + "/src/Cake.Issues*/**/*.AssemblyInfo.cs",
23+
BuildParameters.RootDirectoryPath + "/src/Cake.Issues*/Serialization/LitJson/*.cs",
24+
BuildParameters.RootDirectoryPath + "/src/Cake.Issues.Tests/**/*.cs"
25+
},
26+
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Cake.Issues]LitJson.* -[Shouldly]*",
2127
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
2228
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
2329

src/Cake.Issues.Testing/BaseIssueProviderFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ protected BaseIssueProviderFixture()
3333
public RepositorySettings RepositorySettings { get; set; }
3434

3535
/// <summary>
36-
/// Calls <see cref="BaseIssueProvider.ReadIssues(IssueCommentFormat)"/>.
36+
/// Calls <see cref="BaseIssueProvider.ReadIssues()"/>.
3737
/// </summary>
3838
/// <returns>Issues returned from issue provider.</returns>
3939
public IEnumerable<IIssue> ReadIssues()
4040
{
4141
var issueProvider = this.CreateIssueProvider();
42-
return issueProvider.ReadIssues(IssueCommentFormat.PlainText);
42+
return issueProvider.ReadIssues();
4343
}
4444

4545
/// <summary>

src/Cake.Issues.Testing/Cake.Issues.Testing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<ItemGroup>
2727
<PackageReference Include="Cake.Core" Version="0.33.0" />
2828
<PackageReference Include="Cake.Testing" Version="0.33.0" />
29-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" />
29+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.6" />
3030
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
3131
<PrivateAssets>all</PrivateAssets>
3232
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/Cake.Issues.Testing/FakeConfigurableIssueProvider.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,12 @@ public FakeConfigurableIssueProvider(
5555
/// </summary>
5656
public new IssueProviderSettings IssueProviderSettings => base.IssueProviderSettings;
5757

58-
/// <summary>
59-
/// Gets the format in which issues should be returned.
60-
/// </summary>
61-
public IssueCommentFormat Format { get; private set; }
62-
6358
/// <inheritdoc/>
6459
public override string ProviderName => "Fake Issue Provider";
6560

6661
/// <inheritdoc/>
67-
protected override IEnumerable<IIssue> InternalReadIssues(IssueCommentFormat format)
62+
protected override IEnumerable<IIssue> InternalReadIssues()
6863
{
69-
this.Format = format;
7064
return this.issues;
7165
}
7266
}

src/Cake.Issues.Testing/FakeIssueProvider.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,12 @@ public FakeIssueProvider(ICakeLog log, IEnumerable<IIssue> issues)
4444
/// </summary>
4545
public new RepositorySettings Settings => base.Settings;
4646

47-
/// <summary>
48-
/// Gets the format in which issues should be returned.
49-
/// </summary>
50-
public IssueCommentFormat Format { get; private set; }
51-
5247
/// <inheritdoc/>
5348
public override string ProviderName => "Fake Issue Provider";
5449

5550
/// <inheritdoc/>
56-
protected override IEnumerable<IIssue> InternalReadIssues(IssueCommentFormat format)
51+
protected override IEnumerable<IIssue> InternalReadIssues()
5752
{
58-
this.Format = format;
5953
return this.issues;
6054
}
6155
}

src/Cake.Issues.Testing/FakeLogFileFormat.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public FakeLogFileFormat(ICakeLog log, IEnumerable<IIssue> issues)
4242
/// <inheritdoc/>
4343
public override IEnumerable<IIssue> ReadIssues(
4444
FakeMultiFormatIssueProvider issueProvider,
45-
IssueCommentFormat format,
4645
RepositorySettings repositorySettings,
4746
FakeMultiFormatIssueProviderSettings issueProviderSettings)
4847
{

src/Cake.Issues.Testing/IssueChecker.cs

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public static void Check(
4545
expectedIssue.ProjectName,
4646
expectedIssue.AffectedFileRelativePath?.ToString(),
4747
expectedIssue.Line,
48-
expectedIssue.Message,
48+
expectedIssue.MessageText,
49+
expectedIssue.MessageHtml,
50+
expectedIssue.MessageMarkdown,
4951
expectedIssue.Priority,
5052
expectedIssue.PriorityName,
5153
expectedIssue.Rule,
@@ -66,7 +68,9 @@ public static void Check(
6668
/// <c>null</c> if the issue is not expected to be related to a change in a file.</param>
6769
/// <param name="line">Expected line number.
6870
/// <c>null</c> if the issue is not expected to be related to a file or specific line.</param>
69-
/// <param name="message">Expected message.</param>
71+
/// <param name="messageText">Expected message in plain text format.</param>
72+
/// <param name="messageHtml">Expected message in HTML format.</param>
73+
/// <param name="messageMarkdown">Expected message in Markdown format.</param>
7074
/// <param name="priority">Expected priority.
7175
/// <c>null</c> if no priority is expected.</param>
7276
/// <param name="priorityName">Expected priority name.
@@ -83,7 +87,9 @@ public static void Check(
8387
string projectName,
8488
string affectedFileRelativePath,
8589
int? line,
86-
string message,
90+
string messageText,
91+
string messageHtml,
92+
string messageMarkdown,
8793
int? priority,
8894
string priorityName,
8995
string rule,
@@ -161,10 +167,22 @@ public static void Check(
161167
$"Expected issue.Line to be '{line}' but was '{issue.Line}'.");
162168
}
163169

164-
if (issue.Message != message)
170+
if (issue.MessageText != messageText)
165171
{
166172
throw new Exception(
167-
$"Expected issue.Message to be '{message}' but was '{issue.Message}'.");
173+
$"Expected issue.MessageText to be '{messageText}' but was '{issue.MessageText}'.");
174+
}
175+
176+
if (issue.MessageHtml != messageHtml)
177+
{
178+
throw new Exception(
179+
$"Expected issue.MessageHtml to be '{messageHtml}' but was '{issue.MessageHtml}'.");
180+
}
181+
182+
if (issue.MessageMarkdown != messageMarkdown)
183+
{
184+
throw new Exception(
185+
$"Expected issue.MessageMarkdown to be '{messageMarkdown}' but was '{issue.MessageMarkdown}'.");
168186
}
169187

170188
if (issue.Priority != priority)

src/Cake.Issues.Tests/BaseIssueProviderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void Should_Throw_If_Settings_Is_Null()
4242
var provider = new FakeIssueProvider(new FakeLog());
4343

4444
// When
45-
var result = Record.Exception(() => provider.ReadIssues(IssueCommentFormat.PlainText));
45+
var result = Record.Exception(() => provider.ReadIssues());
4646

4747
// Then
4848
result.IsInvalidOperationException("Initialize needs to be called first.");

src/Cake.Issues.Tests/BaseMultiFormatIssueProviderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void Should_Read_Issues_From_Format()
113113
provider.Initialize(new RepositorySettings(@"c:\repo"));
114114

115115
// When
116-
var result = provider.ReadIssues(IssueCommentFormat.PlainText);
116+
var result = provider.ReadIssues();
117117

118118
// Then
119119
result.Count().ShouldBe(2);

src/Cake.Issues.Tests/Cake.Issues.Tests.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<Product>Cake.Issues</Product>
77
<Copyright>Copyright © BBT Software AG and contributors</Copyright>
@@ -25,7 +25,7 @@
2525
</ItemGroup>
2626

2727
<ItemGroup>
28-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
28+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
2929
<PackageReference Include="Cake.Core" Version="0.33.0" />
3030
<PackageReference Include="Cake.Testing" Version="0.33.0" />
3131
<PackageReference Include="Shouldly" Version="3.0.2" />
@@ -43,6 +43,12 @@
4343
</ItemGroup>
4444

4545
<ItemGroup>
46+
<None Update="Testfiles\issuesV2.json">
47+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
48+
</None>
49+
<None Update="Testfiles\issueV2.json">
50+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
51+
</None>
4652
<None Update="Testfiles\issue.json">
4753
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
4854
</None>

0 commit comments

Comments
 (0)