Skip to content

Commit

Permalink
Merge branch 'release/0.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Oct 17, 2019
2 parents dae0efa + 655645e commit 0407800
Show file tree
Hide file tree
Showing 66 changed files with 8,809 additions and 1,272 deletions.
6 changes: 5 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ image: Visual Studio 2017
#---------------------------------#
# Build Script #
#---------------------------------#
install:
# Update to latest NuGet version since we require 5.3.0 for embedded icon
- ps: nuget update -self

build_script:
- ps: .\build.ps1 -Target AppVeyor

Expand All @@ -27,4 +31,4 @@ branches:
# Build Cache #
#---------------------------------#
cache:
- tools -> setup.cake
- tools -> recipe.cake
10 changes: 10 additions & 0 deletions 3rd-Party-License.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# License overview of included 3rd party code

Cake.Issues is licensed under the terms of the [MIT License](LICENSE).

Cake.Issues includes third-party code which is licensed under its own respective license.

## LitJSON

License: Unlicense
https://github.com/LitJSON/litjson/blob/develop/COPYING
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This addin for the Cake build automation system allows you to read issues from any code analyzer or linter.

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

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

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

## Chat Room

Come join in the conversation about this addin in our Gitter Chat Room
Come join in the conversation about this addin in our Gitter Chat Room.

[![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)

Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ trigger:

pr:
- develop
- release/*
- hotfix/*

jobs:
- job: Windows
Expand Down
4 changes: 2 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ http://cakebuild.net

[CmdletBinding()]
Param(
[string]$Script = "setup.cake",
[string]$Script = "recipe.cake",
[string]$Target = "Default",
[ValidateSet("Release", "Debug")]
[string]$Configuration = "Release",
Expand Down Expand Up @@ -181,4 +181,4 @@ if (!(Test-Path $CAKE_EXE)) {
# Start Cake
Write-Host "Running build script..."
Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
exit $LASTEXITCODE
exit $LASTEXITCODE
2 changes: 1 addition & 1 deletion build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NUGET_EXE=$TOOLS_DIR/nuget.exe
CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe

# Define default arguments.
SCRIPT="setup.cake"
SCRIPT="recipe.cake"
TARGET="Default"
CONFIGURATION="Release"
VERBOSITY="verbose"
Expand Down
5 changes: 3 additions & 2 deletions nuspec/nuget/Cake.Issues.Testing.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ Common helpers for testing add-ins based on Cake.Issues
</description>
<license type="expression">MIT</license>
<projectUrl>https://cakeissues.net</projectUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics@a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</iconUrl>
<icon>icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.git"/>
<copyright>Copyright © BBT Software AG and contributors</copyright>
<tags>Cake Script Cake-Issues Issues Testing</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.7.1</releaseNotes>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.8.0</releaseNotes>
</metadata>
<files>
<file src="..\..\..\..\nuspec\nuget\icon.png" target="" />
<file src="netstandard2.0\Cake.Issues.Testing.dll" target="lib\netstandard2.0" />
<file src="netstandard2.0\Cake.Issues.Testing.pdb" target="lib\netstandard2.0" />
<file src="netstandard2.0\Cake.Issues.Testing.xml" target="lib\netstandard2.0" />
Expand Down
5 changes: 3 additions & 2 deletions nuspec/nuget/Cake.Issues.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ See the Project Site for an overview of the whole ecosystem of addins for workin
</description>
<license type="expression">MIT</license>
<projectUrl>https://cakeissues.net</projectUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics@a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</iconUrl>
<icon>icon.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.git"/>
<copyright>Copyright © BBT Software AG and contributors</copyright>
<tags>Cake Script Cake-Issues CodeAnalysis Linting Issues</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.7.1</releaseNotes>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues/releases/tag/0.8.0</releaseNotes>
</metadata>
<files>
<file src="..\..\..\..\nuspec\nuget\icon.png" target="" />
<file src="netstandard2.0\Cake.Issues.dll" target="lib\netstandard2.0" />
<file src="netstandard2.0\Cake.Issues.pdb" target="lib\netstandard2.0" />
<file src="netstandard2.0\Cake.Issues.xml" target="lib\netstandard2.0" />
Expand Down
Binary file added nuspec/nuget/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions setup.cake → recipe.cake
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@
Environment.SetVariableNames();

BuildParameters.SetParameters(
context: Context,
context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title: "Cake.Issues",
repositoryOwner: "cake-contrib",
repositoryName: "Cake.Issues",
appVeyorAccountName: "cakecontrib",
shouldRunCodecov: false);
shouldRunCodecov: false,
shouldRunGitVersion: true);

BuildParameters.PrintParameters(Context);

ToolSettings.SetToolSettings(
context: Context,
dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Issues.Tests/*.cs", BuildParameters.RootDirectoryPath + "/src/Cake.Issues*/**/*.AssemblyInfo.cs" },
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Shouldly]*",
dupFinderExcludePattern: new string[]
{
BuildParameters.RootDirectoryPath + "/src/Cake.Issues*/**/*.AssemblyInfo.cs",
BuildParameters.RootDirectoryPath + "/src/Cake.Issues*/Serialization/LitJson/*.cs",
BuildParameters.RootDirectoryPath + "/src/Cake.Issues.Tests/**/*.cs"
},
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Cake.Issues]LitJson.* -[Shouldly]*",
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");

Expand Down
4 changes: 2 additions & 2 deletions src/Cake.Issues.Testing/BaseIssueProviderFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ protected BaseIssueProviderFixture()
public RepositorySettings RepositorySettings { get; set; }

/// <summary>
/// Calls <see cref="BaseIssueProvider.ReadIssues(IssueCommentFormat)"/>.
/// Calls <see cref="BaseIssueProvider.ReadIssues()"/>.
/// </summary>
/// <returns>Issues returned from issue provider.</returns>
public IEnumerable<IIssue> ReadIssues()
{
var issueProvider = this.CreateIssueProvider();
return issueProvider.ReadIssues(IssueCommentFormat.PlainText);
return issueProvider.ReadIssues();
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Issues.Testing/Cake.Issues.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<ItemGroup>
<PackageReference Include="Cake.Core" Version="0.33.0" />
<PackageReference Include="Cake.Testing" Version="0.33.0" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.6" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
8 changes: 1 addition & 7 deletions src/Cake.Issues.Testing/FakeConfigurableIssueProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,12 @@ public FakeConfigurableIssueProvider(
/// </summary>
public new IssueProviderSettings IssueProviderSettings => base.IssueProviderSettings;

/// <summary>
/// Gets the format in which issues should be returned.
/// </summary>
public IssueCommentFormat Format { get; private set; }

/// <inheritdoc/>
public override string ProviderName => "Fake Issue Provider";

/// <inheritdoc/>
protected override IEnumerable<IIssue> InternalReadIssues(IssueCommentFormat format)
protected override IEnumerable<IIssue> InternalReadIssues()
{
this.Format = format;
return this.issues;
}
}
Expand Down
8 changes: 1 addition & 7 deletions src/Cake.Issues.Testing/FakeIssueProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,12 @@ public FakeIssueProvider(ICakeLog log, IEnumerable<IIssue> issues)
/// </summary>
public new RepositorySettings Settings => base.Settings;

/// <summary>
/// Gets the format in which issues should be returned.
/// </summary>
public IssueCommentFormat Format { get; private set; }

/// <inheritdoc/>
public override string ProviderName => "Fake Issue Provider";

/// <inheritdoc/>
protected override IEnumerable<IIssue> InternalReadIssues(IssueCommentFormat format)
protected override IEnumerable<IIssue> InternalReadIssues()
{
this.Format = format;
return this.issues;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Cake.Issues.Testing/FakeLogFileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public FakeLogFileFormat(ICakeLog log, IEnumerable<IIssue> issues)
/// <inheritdoc/>
public override IEnumerable<IIssue> ReadIssues(
FakeMultiFormatIssueProvider issueProvider,
IssueCommentFormat format,
RepositorySettings repositorySettings,
FakeMultiFormatIssueProviderSettings issueProviderSettings)
{
Expand Down
28 changes: 23 additions & 5 deletions src/Cake.Issues.Testing/IssueChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public static void Check(
expectedIssue.ProjectName,
expectedIssue.AffectedFileRelativePath?.ToString(),
expectedIssue.Line,
expectedIssue.Message,
expectedIssue.MessageText,
expectedIssue.MessageHtml,
expectedIssue.MessageMarkdown,
expectedIssue.Priority,
expectedIssue.PriorityName,
expectedIssue.Rule,
Expand All @@ -66,7 +68,9 @@ public static void Check(
/// <c>null</c> if the issue is not expected to be related to a change in a file.</param>
/// <param name="line">Expected line number.
/// <c>null</c> if the issue is not expected to be related to a file or specific line.</param>
/// <param name="message">Expected message.</param>
/// <param name="messageText">Expected message in plain text format.</param>
/// <param name="messageHtml">Expected message in HTML format.</param>
/// <param name="messageMarkdown">Expected message in Markdown format.</param>
/// <param name="priority">Expected priority.
/// <c>null</c> if no priority is expected.</param>
/// <param name="priorityName">Expected priority name.
Expand All @@ -83,7 +87,9 @@ public static void Check(
string projectName,
string affectedFileRelativePath,
int? line,
string message,
string messageText,
string messageHtml,
string messageMarkdown,
int? priority,
string priorityName,
string rule,
Expand Down Expand Up @@ -161,10 +167,22 @@ public static void Check(
$"Expected issue.Line to be '{line}' but was '{issue.Line}'.");
}

if (issue.Message != message)
if (issue.MessageText != messageText)
{
throw new Exception(
$"Expected issue.Message to be '{message}' but was '{issue.Message}'.");
$"Expected issue.MessageText to be '{messageText}' but was '{issue.MessageText}'.");
}

if (issue.MessageHtml != messageHtml)
{
throw new Exception(
$"Expected issue.MessageHtml to be '{messageHtml}' but was '{issue.MessageHtml}'.");
}

if (issue.MessageMarkdown != messageMarkdown)
{
throw new Exception(
$"Expected issue.MessageMarkdown to be '{messageMarkdown}' but was '{issue.MessageMarkdown}'.");
}

if (issue.Priority != priority)
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Issues.Tests/BaseIssueProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void Should_Throw_If_Settings_Is_Null()
var provider = new FakeIssueProvider(new FakeLog());

// When
var result = Record.Exception(() => provider.ReadIssues(IssueCommentFormat.PlainText));
var result = Record.Exception(() => provider.ReadIssues());

// Then
result.IsInvalidOperationException("Initialize needs to be called first.");
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Issues.Tests/BaseMultiFormatIssueProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void Should_Read_Issues_From_Format()
provider.Initialize(new RepositorySettings(@"c:\repo"));

// When
var result = provider.ReadIssues(IssueCommentFormat.PlainText);
var result = provider.ReadIssues();

// Then
result.Count().ShouldBe(2);
Expand Down
10 changes: 8 additions & 2 deletions src/Cake.Issues.Tests/Cake.Issues.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<IsPackable>false</IsPackable>
<Product>Cake.Issues</Product>
<Copyright>Copyright © BBT Software AG and contributors</Copyright>
Expand All @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Cake.Core" Version="0.33.0" />
<PackageReference Include="Cake.Testing" Version="0.33.0" />
<PackageReference Include="Shouldly" Version="3.0.2" />
Expand All @@ -43,6 +43,12 @@
</ItemGroup>

<ItemGroup>
<None Update="Testfiles\issuesV2.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Testfiles\issueV2.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Testfiles\issue.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Loading

0 comments on commit 0407800

Please sign in to comment.