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

Commit

Permalink
Rename to Cake.Issues.Reporting.Generic
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Sep 18, 2017
1 parent 125d010 commit fd5a6b1
Show file tree
Hide file tree
Showing 29 changed files with 240 additions and 240 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# HTML Reports for Cake Issues Addin
# Generic text reports for Cake Issues Addin

This addin for the Cake Build Automation System allows you to create HTML reports for issues found
using any code analyzer or linter using the [Cake Issues addin](https://github.com/cake-contrib/Cake.Issues).
This addin for the Cake Build Automation System allows you to create reports in any text based format (HTML, Markdown, ...)
for issues found using any code analyzer or linter using the [Cake Issues addin](https://github.com/cake-contrib/Cake.Issues).

For more information about this add-in see the [Cake.Issues website](https://cake-contrib.github.io/Cake.Issues.Website)
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.Reporting.Html/blob/feature/build/LICENSE)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/blob/feature/build/LICENSE)

## Information

| | Stable | Pre-release |
|:--:|:--:|:--:|
|GitHub Release|-|[![GitHub release](https://img.shields.io/github/release/cake-contrib/Cake.Issues.Reporting.Html.svg)](https://github.com/cake-contrib/Cake.Issues.Reporting.Html/releases/latest)|
|NuGet|[![NuGet](https://img.shields.io/nuget/v/Cake.Issues.Reporting.Html.svg)](https://www.nuget.org/packages/Cake.Issues.Reporting.Html)|[![NuGet](https://img.shields.io/nuget/vpre/Cake.Issues.Reporting.Html.svg)](https://www.nuget.org/packages/Cake.Issues.Reporting.Html)|
|GitHub Release|-|[![GitHub release](https://img.shields.io/github/release/cake-contrib/Cake.Issues.Reporting.Generic.svg)](https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/releases/latest)|
|NuGet|[![NuGet](https://img.shields.io/nuget/v/Cake.Issues.Reporting.Generic.svg)](https://www.nuget.org/packages/Cake.Issues.Reporting.Generic)|[![NuGet](https://img.shields.io/nuget/vpre/Cake.Issues.Reporting.Generic.svg)](https://www.nuget.org/packages/Cake.Issues.Reporting.Generic)|

## Build Status

|Develop|Master|
|:--:|:--:|
|[![Build status](https://ci.appveyor.com/api/projects/status/1bnglf1kihgqorvy/branch/develop?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-issues-reporting-html/branch/develop)|[![Build status](https://ci.appveyor.com/api/projects/status/1bnglf1kihgqorvy/branch/develop?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-issues-reporting-html/branch/master)|
|[![Build status](https://ci.appveyor.com/api/projects/status/1bnglf1kihgqorvy/branch/develop?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-issues-reporting-generic/branch/develop)|[![Build status](https://ci.appveyor.com/api/projects/status/1bnglf1kihgqorvy/branch/develop?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-issues-reporting-generic/branch/master)|

## Code Coverage

[![Coverage Status](https://coveralls.io/repos/github/cake-contrib/Cake.Issues.Reporting.Html/badge.svg?branch=develop)](https://coveralls.io/github/cake-contrib/Cake.Issues.Reporting.Html?branch=develop)
[![Coverage Status](https://coveralls.io/repos/github/cake-contrib/Cake.Issues.Reporting.Generic/badge.svg?branch=develop)](https://coveralls.io/github/cake-contrib/Cake.Issues.Reporting.Generic?branch=develop)

## Quick Links

Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Cake.Issues.Reporting.Html</id>
<title>Cake.Issues.Reporting.Html</title>
<id>Cake.Issues.Reporting.Generic</id>
<title>Cake.Issues.Reporting.Generic</title>
<version>0.0.0</version>
<authors>Pascal Berger</authors>
<owners>pascalberger, cake-contrib</owners>
<summary>HTML reporting support for the Cake.Issues addin for Cake Build Automation System</summary>
<summary>Support for creating any reports in any text based format (HTML, Markdown, ...) for the Cake.Issues addin for Cake Build Automation System</summary>
<description>
The HTML reporting support for the Cake.Issues addin for Cake allows you to create HTML issue reports.
The generic report support for the Cake.Issues addin for Cake allows you to create issue reports in any text format (HTML, Markdown, ...).

This addin provides the aliases for the HTML report format.
This addin provides the aliases for any text based report format.
It also requires the core Cake.Issues and Cake.Issues.Reporting addins and one or more issue providers.

See the Project Site for an overview of the whole ecosystem of addins for working with issues in Cake scripts.
</description>
<licenseUrl>https://github.com/cake-contrib/Cake.Issues.Reporting.Html/blob/develop/LICENSE</licenseUrl>
<licenseUrl>https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/blob/develop/LICENSE</licenseUrl>
<projectUrl>http://cake-contrib.github.io/Cake.Issues.Website</projectUrl>
<iconUrl>https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright © 2017 Pascal Berger</copyright>
<tags>Cake Script Cake-Issues Cake-ReportFormat Issues Reporting Html</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Html/releases/tag/0.1.0</releaseNotes>
<tags>Cake Script Cake-Issues Cake-ReportFormat Issues Reporting Html Markdown</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/releases/tag/0.1.0</releaseNotes>
</metadata>
<files>
<file src="Cake.Issues.Reporting.Html.dll" target="lib\net45" />
<file src="Cake.Issues.Reporting.Html.pdb" target="lib\net45" />
<file src="Cake.Issues.Reporting.Html.xml" target="lib\net45" />
<file src="Cake.Issues.Reporting.Generic.dll" target="lib\net45" />
<file src="Cake.Issues.Reporting.Generic.pdb" target="lib\net45" />
<file src="Cake.Issues.Reporting.Generic.xml" target="lib\net45" />
<file src="RazorEngine.dll" target="lib\net45" />
<file src="RazorEngine.xml" target="lib\net45" />
<file src="System.Web.Razor.dll" target="lib\net45" />
Expand Down
6 changes: 3 additions & 3 deletions setup.cake
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ BuildParameters.SetParameters(
context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title: "Cake.Issues.Reporting.Html",
title: "Cake.Issues.Reporting.Generic",
repositoryOwner: "cake-contrib",
repositoryName: "Cake.Issues.Reporting.Html",
repositoryName: "Cake.Issues.Reporting.Generic",
appVeyorAccountName: "cakecontrib");

BuildParameters.PrintParameters(Context);

ToolSettings.SetToolSettings(
context: Context,
dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Issues.Reporting.Html.Tests/*.cs" },
dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Issues.Reporting.Generic.Tests/*.cs" },
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Cake.Issues]* -[Cake.Issues.Testing]* -[Cake.Issues.Reporting]*",
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
Expand Down
8 changes: 8 additions & 0 deletions src/Cake.Issues.Reporting.Generic.Tests.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Ruleset for Cake.Issues.Reporting.Generic test cases" Description="Rules valid for Cake.Issues.Reporting.Generic test cases" ToolsVersion="14.0">
<Include Path="Cake.Issues.Reporting.Generic.ruleset" Action="Default" />
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ProjectGuid>{1E92A970-E905-4DF8-8ECA-5529B701E8E3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cake.Issues.Reporting.Html.Tests</RootNamespace>
<AssemblyName>Cake.Issues.Reporting.Html.Tests</AssemblyName>
<RootNamespace>Cake.Issues.Reporting.Generic.Tests</RootNamespace>
<AssemblyName>Cake.Issues.Reporting.Generic.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
Expand All @@ -24,7 +24,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\Cake.Issues.Reporting.Html.Tests.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\Cake.Issues.Reporting.Generic.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -33,7 +33,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\Cake.Issues.Reporting.Html.Tests.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\Cake.Issues.Reporting.Generic.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Cake.Core, Version=0.22.0.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -76,16 +76,16 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="HtmlIssueReportFixture.cs" />
<Compile Include="HtmlIssueReportFormatSettingsTests.cs" />
<Compile Include="HtmlIssueReportGeneratorTests.cs" />
<Compile Include="HtmlIssueReportTemplateExtensionsTests.cs" />
<Compile Include="GenericIssueReportFixture.cs" />
<Compile Include="GenericIssueReportFormatSettingsTests.cs" />
<Compile Include="GenericIssueReportGeneratorTests.cs" />
<Compile Include="GenericIssueReportTemplateExtensionsTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cake.Issues.Reporting.Html\Cake.Issues.Reporting.Html.csproj">
<ProjectReference Include="..\Cake.Issues.Reporting.Generic\Cake.Issues.Reporting.Generic.csproj">
<Project>{b514788a-8596-41ca-92b6-86199549dc2a}</Project>
<Name>Cake.Issues.Reporting.Html</Name>
<Name>Cake.Issues.Reporting.Generic</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
namespace Cake.Issues.Reporting.Html.Tests
namespace Cake.Issues.Reporting.Generic.Tests
{
using System.Collections.Generic;
using System.IO;
using Cake.Testing;
using Core.Diagnostics;

internal class HtmlIssueReportFixture
internal class GenericIssueReportFixture
{
public HtmlIssueReportFixture()
public GenericIssueReportFixture()
{
this.Log = new FakeLog { Verbosity = Verbosity.Normal };
this.HtmlIssueReportFormatSettings =
HtmlIssueReportFormatSettings.FromEmbeddedTemplate(HtmlIssueReportTemplate.Diagnostic);
this.GenericIssueReportFormatSettings =
GenericIssueReportFormatSettings.FromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic);
}

public HtmlIssueReportFixture(string templateContent)
public GenericIssueReportFixture(string templateContent)
{
this.Log = new FakeLog { Verbosity = Verbosity.Normal };
this.HtmlIssueReportFormatSettings =
HtmlIssueReportFormatSettings.FromContent(templateContent);
this.GenericIssueReportFormatSettings =
GenericIssueReportFormatSettings.FromContent(templateContent);
}

public FakeLog Log { get; set; }

public HtmlIssueReportFormatSettings HtmlIssueReportFormatSettings { get; set; }
public GenericIssueReportFormatSettings GenericIssueReportFormatSettings { get; set; }

public string CreateReport(IEnumerable<IIssue> issues)
{
var generator =
new HtmlIssueReportGenerator(this.Log, this.HtmlIssueReportFormatSettings);
new GenericIssueReportGenerator(this.Log, this.GenericIssueReportFormatSettings);

var reportFile = System.IO.Path.GetTempFileName();
var reportFile = Path.GetTempFileName();
try
{
var createIssueReportSettings =
new CreateIssueReportSettings(@"c:\Source\Cake.Issues.Reporting.Html", reportFile);
new CreateIssueReportSettings(@"c:\Source\Cake.Issues.Reporting.Generic", reportFile);
generator.Initialize(createIssueReportSettings);
generator.CreateReport(issues);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Cake.Issues.Reporting.Html.Tests
namespace Cake.Issues.Reporting.Generic.Tests
{
using System;
using System.IO;
Expand All @@ -9,7 +9,7 @@
using Testing;
using Xunit;

public sealed class HtmlIssueReportFormatSettingsTests
public sealed class GenericIssueReportFormatSettingsTests
{
public sealed class TheCtor
{
Expand All @@ -21,7 +21,7 @@ public void Should_Throw_If_TemplatePath_Is_Null()

// When
var result = Record.Exception(() =>
HtmlIssueReportFormatSettings.FromFilePath(templatePath));
GenericIssueReportFormatSettings.FromFilePath(templatePath));

// Then
result.IsArgumentNullException("templatePath");
Expand All @@ -35,7 +35,7 @@ public void Should_Throw_If_TemplateContent_Is_Null()

// When
var result = Record.Exception(() =>
HtmlIssueReportFormatSettings.FromContent(templateContent));
GenericIssueReportFormatSettings.FromContent(templateContent));

// Then
result.IsArgumentNullException("templateContent");
Expand All @@ -49,7 +49,7 @@ public void Should_Throw_If_TemplateContent_Is_Empty()

// When
var result = Record.Exception(() =>
HtmlIssueReportFormatSettings.FromContent(templateContent));
GenericIssueReportFormatSettings.FromContent(templateContent));

// Then
result.IsArgumentOutOfRangeException("templateContent");
Expand All @@ -63,7 +63,7 @@ public void Should_Throw_If_TemplateContent_Is_WhiteSpace()

// When
var result = Record.Exception(() =>
HtmlIssueReportFormatSettings.FromContent(templateContent));
GenericIssueReportFormatSettings.FromContent(templateContent));

// Then
result.IsArgumentOutOfRangeException("templateContent");
Expand All @@ -76,7 +76,7 @@ public void Should_Set_Template()
var templateContent = "foo";

// When
var settings = HtmlIssueReportFormatSettings.FromContent(templateContent);
var settings = GenericIssueReportFormatSettings.FromContent(templateContent);

// Then
settings.Template.ShouldBe(templateContent);
Expand All @@ -86,10 +86,10 @@ public void Should_Set_Template()
public void Should_Set_Embedded_Template()
{
// Given
var template = HtmlIssueReportTemplate.Diagnostic;
var template = GenericIssueReportTemplate.HtmlDiagnostic;

// When
var settings = HtmlIssueReportFormatSettings.FromEmbeddedTemplate(template);
var settings = GenericIssueReportFormatSettings.FromEmbeddedTemplate(template);

// Then
settings.Template.ShouldNotBeNullOrWhiteSpace();
Expand All @@ -104,7 +104,7 @@ public void Should_Read_Template_From_Disk()
// Given
string expected;
using (var ms = new MemoryStream())
using (var stream = this.GetType().Assembly.GetManifestResourceStream("Cake.Issues.Reporting.Html.Tests.Templates.TestTemplate.cshtml"))
using (var stream = this.GetType().Assembly.GetManifestResourceStream("Cake.Issues.Reporting.Generic.Tests.Templates.TestTemplate.cshtml"))
{
stream.CopyTo(ms);
var data = ms.ToArray();
Expand All @@ -119,7 +119,7 @@ public void Should_Read_Template_From_Disk()

// When
var settings =
HtmlIssueReportFormatSettings.FromFilePath(fileName);
GenericIssueReportFormatSettings.FromFilePath(fileName);

// Then
settings.Template.ShouldBe(expected);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace Cake.Issues.Reporting.Html.Tests
namespace Cake.Issues.Reporting.Generic.Tests
{
using System.Collections.Generic;
using Cake.Testing;
using Shouldly;
using Testing;
using Xunit;

public sealed class HtmlIssueReportGeneratorTests
public sealed class GenericIssueReportGeneratorTests
{
public sealed class TheCtor
{
Expand All @@ -15,9 +15,9 @@ public void Should_Throw_If_Log_Is_Null()
{
// Given / When
var result = Record.Exception(() =>
new HtmlIssueReportGenerator(
new GenericIssueReportGenerator(
null,
HtmlIssueReportFormatSettings.FromContent("Foo")));
GenericIssueReportFormatSettings.FromContent("Foo")));

// Then
result.IsArgumentNullException("log");
Expand All @@ -28,7 +28,7 @@ public void Should_Throw_If_Settings_Are_Null()
{
// Given / When
var result = Record.Exception(() =>
new HtmlIssueReportGenerator(
new GenericIssueReportGenerator(
new FakeLog(),
null));

Expand All @@ -43,19 +43,19 @@ public sealed class TheInternalCreateReportMethod
public void Should_Generate_Report()
{
// Given
var fixture = new HtmlIssueReportFixture("<ul>@foreach(var issue in Model){<li>@issue.Message</li>}</ul>");
var fixture = new GenericIssueReportFixture("<ul>@foreach(var issue in Model){<li>@issue.Message</li>}</ul>");
var issues =
new List<IIssue>
{
new Issue(
@"src\Cake.Issues.Reporting.Html.Tests\Foo.cs",
@"src\Cake.Issues.Reporting.Generic.Tests\Foo.cs",
10,
"Foo",
0,
"Foo",
"Foo"),
new Issue(
@"src\Cake.Issues.Reporting.Html.Tests\Foo.cs",
@"src\Cake.Issues.Reporting.Generic.Tests\Foo.cs",
12,
"Bar",
0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
namespace Cake.Issues.Reporting.Html.Tests
namespace Cake.Issues.Reporting.Generic.Tests
{
using Shouldly;
using Xunit;

public sealed class HtmlIssueReportTemplateExtensionsTests
public sealed class GenericIssueReportTemplateExtensionsTests
{
public sealed class TheGetTemplateResourceNameMethod
{
[Fact]
public void Should_Return_ResourceName()
{
// Given
var template = HtmlIssueReportTemplate.Diagnostic;
var template = GenericIssueReportTemplate.HtmlDiagnostic;

// When
var result = template.GetTemplateResourceName();
Expand Down

0 comments on commit fd5a6b1

Please sign in to comment.