diff --git a/develop/assets/images/social/news/category/release-notes/page/2.png b/develop/assets/images/social/news/category/release-notes/page/2.png index e69de29bb..9ea27754d 100644 Binary files a/develop/assets/images/social/news/category/release-notes/page/2.png and b/develop/assets/images/social/news/category/release-notes/page/2.png differ diff --git a/develop/assets/images/social/news/category/release-notes/page/3.png b/develop/assets/images/social/news/category/release-notes/page/3.png index e69de29bb..9ea27754d 100644 Binary files a/develop/assets/images/social/news/category/release-notes/page/3.png and b/develop/assets/images/social/news/category/release-notes/page/3.png differ diff --git a/develop/assets/images/social/news/category/release-notes/page/4.png b/develop/assets/images/social/news/category/release-notes/page/4.png index e69de29bb..9ea27754d 100644 Binary files a/develop/assets/images/social/news/category/release-notes/page/4.png and b/develop/assets/images/social/news/category/release-notes/page/4.png differ diff --git a/develop/documentation/issue-providers/docfx/examples/index.html b/develop/documentation/issue-providers/docfx/examples/index.html index dc5799c91..1b9f89609 100644 --- a/develop/documentation/issue-providers/docfx/examples/index.html +++ b/develop/documentation/issue-providers/docfx/examples/index.html @@ -5452,17 +5452,10 @@
#addin "Cake.DocFx" // (1)!
+build.cake#addin nuget:?package=Cake.DocFx&version=1.0.0
#addin nuget:?package=Cake.Issues&version=5.0.1
#addin nuget:?package=Cake.Issues.DocFx&version=5.0.1
-
--
-
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and
- won't break due to updates.
-See Reproducible Builds for details.
-
-
Note
In addition to the DocFx issue provider the Cake.Issues
core addin needs to be added.
@@ -5477,15 +5470,12 @@ Examples
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Cake.DocFx" Version="1.0.0" /> // (1)!
+ <PackageReference Include="Cake.DocFx" Version="1.0.0" />
<PackageReference Include="Cake.Frosting" Version="5.0.0" />
<PackageReference Include="Cake.Frosting.Issues.DocFx" Version="5.0.1" />
</ItemGroup>
</Project>
-
-- Replace
1.0.0
with the desired version.
-
#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools" // (1)!
+build.cake#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=1.0.0"
var logPath = @"c:\build\inspectcode.xml";
var repoRootFolder = MakeAbsolute(Directory("./"));
@@ -5509,13 +5509,6 @@ Examples
Information("{0} issues are found.", issues.Count());
});
-
--
-
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and
- won't break due to updates.
-See Reproducible Builds for details.
-
-
using Cake.Common.Diagnostics;
@@ -5532,7 +5525,7 @@ Examples
.UseContext<BuildContext>()
.InstallTool(
new Uri(
- "nuget:?package=JetBrains.ReSharper.CommandLineTools")) // (1)!
+ "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=1.0.0"))
.Run(args);
}
}
@@ -5576,13 +5569,6 @@ Examples
}
}
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and - won't break due to updates.
-See Reproducible Builds for details.
-#addin "Cake.Markdownlint" // (1)!
+build.cake#addin nuget:?package=Cake.Markdownlint&version=1.0.0
#addin nuget:?package=Cake.Issues&version=5.0.1
#addin nuget:?package=Cake.Issues.Markdownlint&version=5.0.1
-
--
-
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and
- won't break due to updates.
-See Reproducible Builds for details.
-
-
Note
In addition to the markdownlint issue provider the Cake.Issues
core addin needs to be added.
@@ -5476,15 +5469,12 @@ Examples
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Cake.Markdownlint" Version="1.0.0" /> // (1)!
+ <PackageReference Include="Cake.Markdownlint" Version="1.0.0" />
<PackageReference Include="Cake.Frosting" Version="5.0.0" />
<PackageReference Include="Cake.Frosting.Issues.Markdownlint" Version="5.0.1" />
</ItemGroup>
</Project>
-
-- Replace
1.0.0
with the desired version.
-
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and - won't break due to updates.
-See Reproducible Builds for details.
-Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins
diff --git a/develop/documentation/pull-request-systems/azure-devops/examples/pullrequest-id/index.html b/develop/documentation/pull-request-systems/azure-devops/examples/pullrequest-id/index.html
index 1ba9b06cd..d1d110ea2 100644
--- a/develop/documentation/pull-request-systems/azure-devops/examples/pullrequest-id/index.html
+++ b/develop/documentation/pull-request-systems/azure-devops/examples/pullrequest-id/index.html
@@ -5454,20 +5454,13 @@
#addin "Cake.Git" // (1)!
+build.cake#addin nuget:?package=Cake.Git&version=1.0.0
#addin nuget:?package=Cake.Issues&version=5.0.1
#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1
#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1
#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1
-#addin "Cake.AzureDevOps" // (1)!
+#addin nuget:?package=Cake.AzureDevOps&version=1.0.0
-
--
-
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and
- won't break due to updates.
-See Reproducible Builds for details.
-
-
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins
@@ -5484,15 +5477,12 @@
Using With Pull Request ID
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="5.0.0" />
- <PackageReference Include="Cake.Frosting.Git" Version="1.0.0" /> // (1)!
+ <PackageReference Include="Cake.Frosting.Git" Version="{{ cake_git }}" />
<PackageReference Include="Cake.Frosting.Issues.InspectCode" Version="5.0.1" />
<PackageReference Include="Cake.Frosting.Issues.PullRequests.AzureDevOps" Version="5.0.1" />
</ItemGroup>
</Project>
-
-- Replace
1.0.0
with the desired version.
-
#addin "Cake.Git" // (1)!
+build.cake#addin nuget:?package=Cake.Git&version=1.0.0
#addin nuget:?package=Cake.Issues&version=5.0.1
#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1
#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1
#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1
-#addin "Cake.AzureDevOps" // (1)!
+#addin nuget:?package=Cake.AzureDevOps&version=1.0.0
-
--
-
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and
- won't break due to updates.
-See Reproducible Builds for details.
-
-
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins
@@ -5484,15 +5477,12 @@
Using With Repository Remote URL And Source Branch Name
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="5.0.0" />
- <PackageReference Include="Cake.Frosting.Git" Version="1.0.0" /> // (1)!
+ <PackageReference Include="Cake.Frosting.Git" Version="1.0.0" />
<PackageReference Include="Cake.Frosting.Issues.InspectCode" Version="5.0.1" />
<PackageReference Include="Cake.Frosting.Issues.PullRequests.AzureDevOps" Version="5.0.1" />
</ItemGroup>
</Project>
-
-- Replace
1.0.0
with the desired version.
-
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and - won't break due to updates.
-See Reproducible Builds for details.
-Cake.Frosting.Issues.Recipe provides a build context from which you need to inherit your custom build context. The build context contains configuration parameters, but also the state of the current running build, diff --git a/develop/search/search_index.json b/develop/search/search_index.json index c60e21817..3001d83c1 100644 --- a/develop/search/search_index.json +++ b/develop/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"api/","title":"API","text":""},{"location":"api/#core-addins","title":"Core Addins","text":"
Cake Recipe Packages
Cake Issues recipes provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
It handles all the parsing, integration with build and pull request systems for you, using the individual Cake Issues addins.
Recipes
Read issues provided by tools
The ReadIssues
aliases can be used for reading issues reported by a linter to tool using an issue provider.
There are overloads for reading using a single or multiple issue provider.
Aliases
Create issues in your build
The NewIssue
aliases can be used for creating issues in the build script.
Aliases
Support for file links
Support for creating links to file & location on source code hosting system (GitHub, Azure Repos, etc).
Aliases
Issue serialization
Support for serializing and deserializing created issues and issues read from tools.
Aliases
Support for multiple message formats
Support for reading issues in multiple formats (Plain text, Markdown, HTML) if supported by issue provider.
Support for run information
Support for passing additional run information to identify specific runs.
Fail builds on reported issues
The BreakBuildOnIssues
aliases can be used for failing builds if specific issues were reported.
There are overloads for failing if issues of certain minimum priority or issue providers are found, or by passing any custom function.
Aliases
Create reports
The CreateIssueReport
aliases can be used for creating reports in a supported reporting format.
There are overloads for reading issues from a single or multiple issue provider or for passing an existing list of issues.
Aliases
Add comments to pull requests
The ReportIssuesToPullRequest
aliases can be used for writing issues as comments to pull requests.
There are overloads for reading issues from a single or multiple issue provider or for passing an existing list of issues.
Aliases
Report issues to build runs
The ReportIssuesToPullRequest
aliases can be used for reporting issues to build runs.
There are overloads for reading issues from a single or multiple issue provider or for passing an existing list of issues.
Aliases
Issue filters
Support for passing custom issue filter routines.
Setting
Limit reported issues
Advanced support to limit number of maximum issues per run, across multiple runs or per issue provider through settings.
Settings
Automatic comment resolving
If supported by the pull request system, comments for issues are automatic resolved if fixed in subsequent commits.
The Cake Issues addins are built in a modular architecture, allowing to easily enhance it for supporting additional analyzers, linters, report formats and pull request systems.
"},{"location":"documentation/how-cake-issues-works/#cakeissues-addin","title":"Cake.Issues addin","text":"The Cake.Issues
addin provides aliases for creating issues or reading issues using one or more issue providers.
Support for different code analyzers and linters is provided through issue provider addins which cover a wide range of linters and tools.
The issues are read into IIssue objects which then can be passed to Cake.Issues.Reporting addin, Cake.Issues.PullRequests addin or further processed in the build script.
The use of issue provider addins, which contain the parsing logic for individual tool output formats, and the use of IIssue as common data structure, allows to abstract the tooling output from other concerns like integration with build systems, pull request workflow or the creation of reports.
"},{"location":"documentation/how-cake-issues-works/#cakeissuesreporting-addin","title":"Cake.Issues.Reporting addin","text":"The Cake.Issues.Reporting
addin provides aliases for creating reports for issues which are read or have been created using the Cake.Issues addin.
Support for different report formats is provided through report format addins.
"},{"location":"documentation/how-cake-issues-works/#cakeissuespullrequests-addin","title":"Cake.Issues.PullRequests addin","text":"The Cake.Issues.PullRequests
addin provides aliases for reporting issues which are read or have been created using the Cake.Issues addin as comments to pull requests or builds.
Support for different pull request systems is provided through pull request system addins.
"},{"location":"documentation/overview/","title":"Introduction","text":"The Cake.Issues addins for the Cake build automation system offer an extensive and flexible solution for reading linting issues.
Cake.Issues redefines issue management within the Cake build system by offering a comprehensive, universal, and extensible solution. The unique capabilities of the addins empower development teams to enforce coding standards, generate insightful reports, seamlessly incorporate various linting tools, and streamlining the integration with pull requests. With its modular architecture and extensive set of aliases, Cake.Issues provides a future-proof infrastructure for issue management in Cake builds, fostering a more efficient and adaptable development process.
"},{"location":"documentation/overview/#unique-problem-solving","title":"Unique Problem Solving","text":"Some examples how Cake.Issues can help development teams to improve code quality.
"},{"location":"documentation/overview/#break-build-on-linting-issues","title":"Break build on linting issues","text":"Cake.Issues provides a seamless integration, allowing you to enforce coding standards by breaking builds when linting issues are detected.
Breaking builds
"},{"location":"documentation/overview/#pull-requests-integration","title":"Pull Requests integration","text":"Ensure linting issues are promptly addressed by having them reported as comments on pull requests. Cake.Issues bridges the gap between linting tools and version control systems, fostering efficient collaboration during code reviews.
Integrate with pull request systems
"},{"location":"documentation/overview/#reports","title":"Reports","text":"Craft detailed and visually appealing reports for linting issues directly within your Cake build. The addins facilitates easy identification and resolution of linting concerns, enhancing the overall code quality.
Creating Reports
"},{"location":"documentation/overview/#universal-compatibility","title":"Universal Compatibility","text":""},{"location":"documentation/overview/#diverse-linting-tool-support","title":"Diverse Linting Tool Support","text":"Regardless of the linting tools you use, Cake.Issues ensures that you're not left out. Cake.Issues supports a variety of analyzers and linters, allowing you to incorporate new tools effortlessly while maintaining integration with existing ones.
Supported Tools
"},{"location":"documentation/overview/#build-system-agnosticism","title":"Build System Agnosticism","text":"Embrace the freedom to choose the build system that best suit your needs. If your current build system lacks tasks for reporting issues in pull requests, Cake.Issues steps in to fill that void seamlessly. In the case of using multiple CI services, Cake.Issues guarantees a consistent feature set across all of them.
Supported Build and pull request systems
"},{"location":"documentation/overview/#unprecedented-extensibility","title":"Unprecedented Extensibility","text":""},{"location":"documentation/overview/#modular-architecture","title":"Modular Architecture","text":"The Cake.Issues addin breaks away from the norm by offering a modular architecture. Comprising over 15 distinct addins, it presents a cohesive solution through more than 75 aliases for Cake builds, providing unparalleled flexibility.
Architecture
"},{"location":"documentation/overview/#extensible-infrastructure","title":"Extensible Infrastructure","text":"Designed with extensibility in mind, Cake.Issues provides extension points for supporting additional analyzers, linters,report formats, and code review systems. This adaptability ensures that your build scripts can evolve with the ever-changing landscape of development tools.
Documentation
"},{"location":"documentation/supported-tools/","title":"Supported Tools","text":"This pages lists tools known to be working with Cake Issues (1)
To build this a package we are using Cake.
On Windows PowerShell run:
./build\n
On OSX/Linux run:
./build.sh\n
"},{"location":"documentation/contributing/how-to-contribute/","title":"How to contribute","text":"The repositories are using GitFlow with default configuration. Development is happening on develop
branch.
To contribute:
develop
.For getting started see issues marked with Up-for-grabs
in the individual repositories.
See Cake.Recipe documentation how to create a new release of this addin.
"},{"location":"documentation/extending/","title":"Extending","text":"Cake Issues can easily be extended with additional Issue Provider, Report Formats and Pull Request System integrations.
"},{"location":"documentation/extending/testing/","title":"Testing","text":"The Cake.Issues.Testing package provides different helper classes for writing test cases for issue provider, report format or pull request system addins.
API Documentation on fuget.org
"},{"location":"documentation/extending/issue-provider/categories/","title":"Alias categories","text":"Issue provider aliases should use the IssuesAliasConstants.MainCakeAliasCategory and IssuesAliasConstants.IssueProviderCakeAliasCategory constants for defining their category:
[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyIssueProviderAliases\n{\n [CakeMethodAlias]\n [CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\n public static IIssueProvider MyIssueProvider(\n this ICakeContext context)\n {\n }\n}\n
"},{"location":"documentation/extending/issue-provider/helper/","title":"Helper","text":"The following helpers are provider by Cake.Issues
for simplifying implementation of issue providers:
Cake.Issues provides infrastructure to get links to files on source code hosts like GitHub or Azure Repos. This infrastructure can be used inside issue providers to generate file links which can be used inside the issue messages:
protected override IEnumerable<IIssue> InternalReadIssues()\n{\n var result = new List<IIssue>();\n\n var filePath = \"foo.cs\";\n var line = 10;\n\n var fileLink = \n this.Settings.FileLinkSettings.GetFileLink(\n IssueBuilder\n .NewIssue(\"Issue for creating file link\", this)\n .InFile(filePath, line)\n .Create()\n );\n\n var htmlMessage =\n $\"This is an issues in the file <a href=\\\"{fileLink}\\\">{filePath}</a>\";\n\n var issue =\n IssueBuilder\n .NewIssue(\"MyMessage\", this)\n .WithMessageInHtmlFormat(htmlMessage)\n .InFile(filePath, line)\n .Create();\n\n return result;\n}\n
"},{"location":"documentation/extending/issue-provider/overview/","title":"Overview","text":"Issue providers need to implement the IIssueProvider interface.
"},{"location":"documentation/extending/issue-provider/overview/#base-classes","title":"Base classes","text":"For simplifying implementation there exists base classes from which concrete implementation can be inherited.
Base Class Use case Tutorial BaseIssueProvider Base class for a simple issue provider implementation. Simple provider BaseConfigurableIssueProvider Base class for a issue provider with issue provider specific settings. Provider settings BaseMultiFormatIssueProvider Base class for issue providers supporting multiple log formats. Multiple log file formats support"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/","title":"Multiple log file formats","text":"A single issue provider might support reading issues from multiple different log file formats. For these cases the Cake.Issue
addin provides the BaseMultiFormatIssueProvider, BaseMultiFormatIssueProviderSettings and BaseLogFileFormat classes for simplifying implementation in the issue provider addin.
A concrete class inheriting from BaseMultiFormatIssueProvider needs to be implemented defining the concrete types.
/// <summary>\n/// My issue provider.\n/// </summary>\npublic class MyIssuesProvider : BaseMultiFormatIssueProvider<MyIssuesSettings, MyIssuesProvider>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesProvider\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log context.</param>\n /// <param name=\"settings\">Settings for reading the log file.</param>\n public MyIssuesProvider(ICakeLog log, MyIssuesSettings settings)\n : base(log, settings)\n {\n }\n\n /// <inheritdoc />\n public override string ProviderName => \"MyIssuesProvider\";\n}\n
Also a concrete class inheriting from BaseMultiFormatIssueProviderSettings needs to be implemented defining the concrete types. Based on the capabilities of the log file formats the appropriate constructors for reading from the file system or memory can be made public:
/// <summary>\n/// Settings for my issue provider.\n/// </summary>\npublic class MyIssuesSettings : BaseMultiFormatIssueProviderSettings<MyIssuesProvider, MyIssuesSettings>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for reading a log file on disk.\n /// </summary>\n /// <param name=\"logFilePath\">Path to the log file.\n /// The log file needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n /// <param name=\"format\">Format of the provided log file.</param>\n public MyIssuesSettings(FilePath logFilePath, MyLogFileFormat format)\n : base(logFilePath, format)\n {\n }\n\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for a log file content in memory.\n /// </summary>\n /// <param name=\"logFileContent\">Content of the log file.\n /// The log file needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n /// <param name=\"format\">Format of the provided log file.</param>\n public MyIssuesSettings(byte[] logFileContent, MyLogFileFormat format)\n : base(logFileContent, format)\n {\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/#implementing-log-file-format-infrastructure","title":"Implementing log file format infrastructure","text":"An abstract class inheriting from BaseLogFileFormat needs to be implemented defining the concrete types for the issue provider:
/// <summary>\n/// Base class for all log file formats supported by my issue provider.\n/// </summary>\npublic abstract class MyLogFileFormat : BaseLogFileFormat<MyIssuesProvider, MyIssuesSettings>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyLogFileFormat\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log instance.</param>\n protected MyLogFileFormat(ICakeLog log)\n : base(log)\n {\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/#implementing-log-file-format","title":"Implementing log file format","text":"The different log file formats of an issue provider need to be inherited from the abstract log file format class:
/// <summary>\n/// Concrete log format.\n/// </summary>\ninternal class MyConcreteLogFileFormat : MyLogFileFormat\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyConcreteLogFileFormat\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log instance.</param>\n public MyConcreteLogFileFormat(ICakeLog log)\n : base(log)\n {\n }\n\n /// <inheritdoc/>\n public override IEnumerable<IIssue> ReadIssues(\n MyIssuesProvider issueProvider,\n RepositorySettings repositorySettings,\n MyIssuesSettings issueProviderSettings)\n {\n issueProvider.NotNull(nameof(issueProvider));\n repositorySettings.NotNull(nameof(repositorySettings));\n issueProviderSettings.NotNull(nameof(issueProviderSettings));\n\n var result = new List<IIssue>();\n\n // Implement log file format logic here.\n result.Add(\n IssueBuilder\n .NewIssue(\"Some message\", issueProvider)\n .WithPriority(IssuePriority.Warning)\n .OfRule(\"My rule\")\n .Create());\n\n return result;\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/#aliases","title":"Aliases","text":"For each concrete log file format a Cake property alias should be provided:
/// <summary>\n/// Gets an instance of the concrete log format.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Instance of the concrete log format.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static MyLogFileFormat MyConcreteLogFileFormat(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return new MyConcreteLogFileFormat(context.Log);\n}\n
Additionally an alias for reading issues with a specific format should be provided:
/// <summary>\n/// Gets an instance of a provider for issues using specified settings\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"settings\">Settings for reading the log.</param>\n/// <returns>Instance of a provider for issues.</returns>\n/// <example>\n/// <para>Read issues using my concrete log file format:</para>\n/// <code>\n/// <![CDATA[\n/// var settings =\n/// new MyIssuesSettings(\n/// @\"c:\\build\\issues.xml\",\n/// MyConcreteLogFileFormat);\n///\n/// var issues =\n/// ReadIssues(\n/// MyIssues(settings),\n/// @\"c:\\repo\");\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssues(\n this ICakeContext context,\n MyIssuesSettings settings)\n{\n context.NotNull(nameof(context));\n settings.NotNull(nameof(settings));\n\n return new MyIssuesProvider(context.Log, settings);\n}\n
For convenience of the user and based on the capabilities of the issue provider additional aliases for reading from the file system or from memory can be added:
/// <summary>\n/// Gets an instance of my issues provider for reading a log file from disk.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFilePath\">Path to the log file.\n/// The log file needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n/// <param name=\"format\">Format of the provided log file.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromFilePath(\n/// @\"c:\\build\\issues.log\",\n/// MyConcreteLogFileFormat));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromFilePath(\n this ICakeContext context,\n FilePath logFilePath,\n MyLogFileFormat format)\n{\n context.NotNull(nameof(context));\n logFilePath.NotNull(nameof(logFilePath));\n format.NotNull(nameof(format));\n\n return context.MyIssues(new MyIssuesSettings(logFilePath, format));\n}\n\n/// <summary>\n/// Gets an instance of my issues provider for reading a log file from memory.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFileContent\">Content of the log file.\n/// The log content needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n/// <param name=\"format\">Format of the provided log content.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromContent(\n/// logFileContent,\n/// MyConcreteLogFileFormat));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromContent(\n this ICakeContext context,\n string logFileContent,\n MyLogFileFormat format)\n{\n context.NotNull(nameof(context));\n logFileContent.NotNullOrWhiteSpace(nameof(logFileContent));\n format.NotNull(nameof(format));\n\n return context.MyIssues(new MyIssuesSettings(logFileContent.ToByteArray(), format));\n}\n
Finally an additional property alias for returning the provider type name should be defined:
/// <summary>\n/// Gets the name of my issue provider.\n/// This name can be used to identify issues based on the <see cref=\"IIssue.ProviderType\"/> property.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Name of my issue provider.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static string MyIssuesProviderTypeName(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return typeof(MyIssuesProvider).FullName;\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/rule-url-resolving/","title":"Rule URL resolving","text":"For cases where additional logic is required to determine the URL for a rule, the Cake.Issue
addin provides the BaseRuleDescription and BaseRuleUrlResolver classes for simplifying implementation of providing URLs linking to site providing information about issues.
In the issue provider a concrete class inheriting from BaseRuleDescription should be implemented containing all properties required to determine the URL to a rule. The following class adds two properties Category
and RuleId
to the description:
/// <summary>\n/// Class describing rules for my issue provider.\n/// </summary>\npublic class MyRuleDescription : BaseRuleDescription\n{\n /// <summary>\n /// Gets or sets the category of the rule.\n /// </summary>\n public string Category { get; set; }\n\n /// <summary>\n /// Gets or sets the identifier of the rule.\n /// </summary>\n public int RuleId { get; set; }\n}\n
Also a class inheriting from BaseRuleUrlResolver needs to be implemented containing an implementation of TryGetRuleDescription for parsing rule urls to the concrete BaseRuleDescription class.
/// <summary>\n/// Class for retrieving an URL linking to a site describing a rule.\n/// </summary>\ninternal class MyRuleUrlResolver : BaseUrlResolver<MyRuleDescription>\n{\n /// <inheritdoc/>\n protected override bool TryGetRuleDescription(string rule, MyRuleDescription ruleDescription)\n {\n ruleDescription.RuleId = rule.Substring(3, rule.Length - 3);\n ruleDescription.Category = rule.Substring(0, 3);\n\n return true;\n }\n }\n
To use the URL resolver the ResolveRuleUrl method needs to be called:
var resolver = new MyRuleUrlResolver();\nvar url = resolver.ResolveRuleUrl(rule)\n
Afterwards different resolvers can be registered which return the actual URL based on the rule description:
/// <summary>\n/// Class for retrieving an URL linking to a site describing a rule.\n/// </summary>\ninternal class MyRuleUrlResolver : BaseUrlResolver<MyRuleDescription>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyRuleUrlResolver\"/> class.\n /// </summary>\n private MyRuleUrlResolver()\n {\n // Add resolver for different issue categories.\n this.AddUrlResolver(x =>\n x.Category.ToUpperInvariant() == \"FOO\" ?\n new Uri(\"https://www.google.com/search?q=%22\" + x.Rule) :\n null);\n this.AddUrlResolver(x =>\n x.Category.ToUpperInvariant() == \"BAR\" ?\n new Uri(\"https://www.bing.com/search?q=%22\" + x.Rule) :\n null);\n }\n }\n
"},{"location":"documentation/extending/issue-provider/tutorials/rule-url-resolving/#support-custom-url-resolvers","title":"Support custom URL resolvers","text":"The AddUrlResolver method can also be called from an Cake alias to allow users of the addin to register custom resolvers. For this the URL resolver class needs to be implemented as a singleton:
/// <summary>\n/// Class for retrieving an URL linking to a site describing a rule.\n/// </summary>\ninternal class MyRuleUrlResolver : BaseUrlResolver<MyRuleDescription>\n{\n private static readonly Lazy<MyRuleUrlResolver> InstanceValue =\n new Lazy<MyRuleUrlResolver>(() => new MyRuleUrlResolver());\n\n /// <summary>\n /// Gets the instance of the rule resolver.\n /// </summary>\n public static MyRuleUrlResolver Instance => InstanceValue.Value;\n}\n\n[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyIssueProviderAliases\n{\n /// <summary>\n /// Registers a new URL resolver with default priority of 0.\n /// </summary>\n /// <param name=\"context\">The context.</param>\n /// <param name=\"resolver\">Resolver which returns an <see cref=\"Uri\"/> linking to a site\n /// containing help for a specific <see cref=\"MyRuleDescription\"/>.</param>\n [CakeMethodAlias]\n [CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\n public static void MyIssueProviderAddRuleUrlResolver(\n this ICakeContext context,\n Func<MyRuleDescription, Uri> resolver)\n {\n context.NotNull(nameof(context));\n resolver.NotNull(nameof(resolver));\n\n MyRuleUrlResolver.Instance.AddUrlResolver(resolver);\n }\n
"},{"location":"documentation/extending/issue-provider/tutorials/settings/","title":"Provider settings","text":"Often issue providers require specific settings. For these cases the Cake.Issue
addin provides the BaseConfigurableIssueProvider and IssueProviderSettings classes for simplifying implementation in the issue provider addin.
A concrete class inheriting from BaseConfigurableIssueProvider needs to be implemented defining the concrete settings class to use:
/// <summary>\n/// My issue provider.\n/// </summary>\npublic class MyIssuesProvider : BaseConfigurableIssueProvider<MyIssuesSettings>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesProvider\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log context.</param>\n /// <param name=\"settings\">Settings for reading the log file.</param>\n public MyIssuesProvider(ICakeLog log, MyIssuesSettings settings)\n : base(log, settings)\n {\n }\n\n /// <inheritdoc />\n public override string ProviderName => \"MyIssuesProvider\";\n\n /// <inheritdoc />\n protected override IEnumerable<IIssue> InternalReadIssues()\n {\n var result = new List<IIssue>();\n\n // Implement issue provider logic here.\n result.Add(\n IssueBuilder\n .NewIssue(\"Some message\", issueProvider)\n .WithPriority(IssuePriority.Warning)\n .OfRule(\"My rule\")\n .Create());\n\n return result;\n }\n}\n
Also a concrete class inheriting from IssueProviderSettings needs to be implemented. Based on the capabilities of the issue provider the appropriate constructors for reading from the file system or memory can be made public:
/// <summary>\n/// Settings for my issue provider.\n/// </summary>\npublic class MyIssuesSettings : IssueProviderSettings\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for reading a log file on disk.\n /// </summary>\n /// <param name=\"logFilePath\">Path to the log file.</param>\n public MyIssuesSettings(FilePath logFilePath)\n : base(logFilePath)\n {\n }\n\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for a log file content in memory.\n /// </summary>\n /// <param name=\"logFileContent\">Content of the log file.</param>\n public MyIssuesSettings(byte[] logFileContent)\n : base(logFileContent)\n {\n }\n\n // Add additional settings for the issue provider here.\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/settings/#aliases","title":"Aliases","text":"An alias for reading issues with the provider should be provided:
/// <summary>\n/// Gets an instance of my issues provider using specified settings.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"settings\">Settings for reading the log.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var settings =\n/// new MyIssuesSettings(@\"c:\\build\\issues.log\");\n///\n/// var issues =\n/// ReadIssues(\n/// MyIssues(settings));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssues(\n this ICakeContext context,\n MyIssuesSettings settings)\n{\n context.NotNull(nameof(context));\n settings.NotNull(nameof(settings));\n\n return new MyIssuesProvider(context.Log, settings);\n}\n
For convenience of the user and based on the capabilities of the issue provider additional aliases for reading from the file system or from memory can be added:
/// <summary>\n/// Gets an instance of my issues provider for reading a log file from disk.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFilePath\">Path to the log file.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromFilePath(@\"c:\\build\\issues.log\"));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromFilePath(\n this ICakeContext context,\n FilePath logFilePath)\n{\n context.NotNull(nameof(context));\n logFilePath.NotNull(nameof(logFilePath));\n\n return context.MyIssues(new MyIssuesSettings(logFilePath));\n}\n\n/// <summary>\n/// Gets an instance of my issues provider for reading a log file from memory.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFileContent\">Content of the log file.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromContent(logFileContent));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromContent(\n this ICakeContext context,\n string logFileContent)\n{\n context.NotNull(nameof(context));\n logFileContent.NotNullOrWhiteSpace(nameof(logFileContent));\n\n return context.MyIssues(new MyIssuesSettings(logFileContent.ToByteArray()));\n}\n
Finally an additional property alias for returning the provider type name should be defined:
/// <summary>\n/// Gets the name of my issue provider.\n/// This name can be used to identify issues based on the <see cref=\"IIssue.ProviderType\"/> property.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Name of my issue provider.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static string MyIssuesProviderTypeName(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return typeof(MyIssuesProvider).FullName;\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/simple/","title":"Simple issue provider","text":"This tutorial explains how to implement a simple issue provider using the BaseIssueProvider class from the Cake.Issue
addin.
A concrete class inheriting from BaseIssueProvider needs to be implemented:
/// <summary>\n/// My issue provider.\n/// </summary>\npublic class MyIssuesProvider : BaseIssueProvider\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesProvider\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log context.</param>\n public MyIssuesProvider(ICakeLog log)\n : base(log, settings)\n {\n }\n\n /// <inheritdoc />\n public override string ProviderName => \"MyIssuesProvider\";\n\n /// <inheritdoc />\n protected override IEnumerable<IIssue> InternalReadIssues()\n {\n var result = new List<IIssue>();\n\n // Implement issue provider logic here.\n result.Add(\n IssueBuilder\n .NewIssue(\"Some message\", issueProvider)\n .WithPriority(IssuePriority.Warning)\n .OfRule(\"My rule\")\n .Create());\n\n return result;\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/simple/#aliases","title":"Aliases","text":"An alias for reading issues with the provider should be provided:
/// <summary>\n/// Gets an instance of my issues provider using specified settings.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssues());\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssues(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return new MyIssuesProvider(context.Log);\n}\n
Additionally a property alias for returning the provider type name should be defined:
/// <summary>\n/// Gets the name of my issue provider.\n/// This name can be used to identify issues based on the <see cref=\"IIssue.ProviderType\"/> property.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Name of my issue provider.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static string MyIssuesProviderTypeName(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return typeof(MyIssuesProvider).FullName;\n}\n
"},{"location":"documentation/extending/pull-request-system/categories/","title":"Alias categories","text":"Pull request system aliases should use the IssuesAliasConstants.MainCakeAliasCategory and PullRequestsAliasConstants.PullRequestSystemCakeAliasCategory constants for defining their category:
[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyPullRequestSystemAliases\n{\n [CakeMethodAlias]\n [CakeAliasCategory(PullRequestsAliasConstants.PullRequestSystemCakeAliasCategory)]\n public static IPullRequestSystem MyPullRequestSystem(\n this ICakeContext context)\n {\n }\n}\n
"},{"location":"documentation/extending/pull-request-system/overview/","title":"Overview","text":"Pull Request Systems need to implement the IPullRequestSystem interface.
"},{"location":"documentation/extending/pull-request-system/overview/#baseclasses","title":"BaseClasses","text":"For simplifying implementation there exists base classes from which concrete implementation can be inherited. BasePullRequestSystem is the main base class with the required functionality for a pull request system implementation. Additionally there exists several classes which can be implemented to support additional optional capabilities in a pull request system implementation.
Base Class Use case Tutorial BasePullRequestSystem Base class for all pull request system implementations. BaseCheckingCommitIdCapability Base class for capability to post issues only if pull request is for a specific commit. BaseDiscussionThreadsCapability Base class for capability to read, resolve and reopen discussion threads. BaseFilteringByModifiedFilesCapability Base class for capability to filter issues to only those affecting files modified in the pull request."},{"location":"documentation/extending/report-format/categories/","title":"Alias categories","text":"Report format aliases should use the IssuesAliasConstants.MainCakeAliasCategory and ReportingAliasConstants.ReportingFormatCakeAliasCategory constants for defining their category:
[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyReportFormatAliases\n{\n [CakeMethodAlias]\n [CakeAliasCategory(ReportingAliasConstants.ReportingFormatCakeAliasCategory)]\n public static IIssueReportFormat MyReportFormat(\n this ICakeContext context)\n {\n }\n}\n
"},{"location":"documentation/extending/report-format/overview/","title":"Overview","text":"Report formats need to implement the IIssueReportFormat interface. For simplifying implementation there exists an abstract IssueReportFormat base class from which concrete implementation can be inherited.
"},{"location":"documentation/issue-providers/","title":"Issue Providers","text":"Issue provider addins are responsible for providing the output of an analyzer or linter to the Cake Issues addin.
Tip
See How to implement issue providers for instruction on how to implement support for additional issue providers.
"},{"location":"documentation/issue-providers/docfx/","title":"DocFx","text":"Support for reading warnings reported by DocFx is implemented in the Cake.Issues.DocFx addin.
To call DocFx from a Cake script the Cake.DocFx addin can be used. To read issues from DocFx log files the DocFx issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin \"Cake.DocFx\" // (1)!\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.DocFx&version=5.0.1\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
Note
In addition to the DocFx issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.DocFx\" Version=\"1.0.0\" /> // (1)!\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.DocFx\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
1.0.0
with the desired version.The following example contains a task which will build the DocFx project and write a log file and a task to read issues from the log file and write the number of warnings to the console:
Cake .NET ToolCake Frosting build.cakevar logPath = @\"c:\\build\\docfx.log\";\nvar repoRootFolder = MakeAbsolute(Directory(\"./\"));\nvar docRootPath = @\"docs\";\n\nTask(\"Build-Documentation\").Does(() =>\n{\n // Run DocFx.\n DocFxBuild(new DocFxBuildSettings()\n {\n LogPath = logPath\n });\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Build-Documentation\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n DocFxIssuesFromFilePath(logPath, docRootPath),\n repoRootPath); \n\n Information(\"{0} issues are found.\", issues.Count());\n });\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Core.IO;\nusing Cake.Core;\nusing Cake.DocFx;\nusing Cake.DocFx.Build;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\docfx.log\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n public string DocRootPath { get; } = \"docs\";\n}\n\n[TaskName(\"Build-Documentation\")]\npublic sealed class BuildDocumentationTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Run DocFx.\n context.DocFxBuild(new DocFxBuildSettings()\n {\n LogPath = context.LogPath\n });\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(BuildDocumentationTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.DocFxIssuesFromFilePath(\n context.LogPath,\n context.DocRootPath),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/issue-providers/docfx/features/","title":"Features","text":"The Cake.Issues.DocFx addin provides the following features.
Tip: Running DocFxDocFx can be run with Cake.DocFx addin.
"},{"location":"documentation/issue-providers/docfx/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Support for reading issues reported by ESLint is implemented in the Cake.Issues.EsLint addin.
The Cake.Issues.EsLint addin provides the following features.
Tip: Running ESLintESLint can be run with Cake.ESLint addin.
"},{"location":"documentation/issue-providers/eslint/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
(4)IIssue.MessageText
Support for analyzing Git repositories is implemented in the Cake.Issues.GitRepository addin.
To analyze Git repositories you need to import the Git repository issue provider:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.GitRepository&version=5.0.1\n
Note
In addition to the Git repository issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.GitRepository\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example prints the number of binary files which are not tracked by Git Large File Storage in a repository.
Warning
Checking binary files requires Git and Git Large File Storage available on the local machine.
Cake .NET ToolCake Frosting build.cakeTask(\"Analyze-Repo\")\n.Does(() =>\n{\n // Read issues.\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n var settings =\n new GitRepositoryIssuesSettings\n {\n CheckBinaryFilesTrackedByLfs = true\n }; \n\n var issues =\n ReadIssues(\n GitRepositoryIssues(settings),\n repoRootPath); \n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Analyze-Repo\")]\npublic sealed class AnalyzeRepoTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n // Read issues.\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n var settings =\n new GitRepositoryIssuesSettings\n {\n CheckBinaryFilesTrackedByLfs = true\n }; \n\n var issues =\n context.ReadIssues(\n context.GitRepositoryIssues(settings),\n repoRootPath); \n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/issue-providers/gitrepository/features/","title":"Features","text":"The Cake.Issues.GitRepository addin provides the following features.
"},{"location":"documentation/issue-providers/gitrepository/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
A binary file in the repository is not tracked by Git Large File Storage.
"},{"location":"documentation/issue-providers/gitrepository/rules/BinaryFileNotTrackedByLfs/#rule-description","title":"Rule description","text":"By its nature Git repositories cannot handle binary files well and will keep a full copy of that file in the repository every time a change to that file is committed. Considering that you always clone the full history of a repository, and not only the latest version, using binary files in a repository considerably slow downs the operation. Git Large File Storage replaces large files with small text pointers inside the Git repository, while storing the file contents on a remote server.
Info
The rule assumes that all files, which are not text files are binary files. This also includes for example empty files.
"},{"location":"documentation/issue-providers/gitrepository/rules/BinaryFileNotTrackedByLfs/#how-to-fix-violations","title":"How to fix violations","text":"Track the file with Git Large File Storage.
"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/","title":"FilePathTooLong","text":"Metadata Rule Id FilePathTooLong Priority Warning Available in 0.7.3 or higher"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/#cause","title":"Cause","text":"The path of a file in the repository is too long.
"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/#rule-description","title":"Rule description","text":"Some operating systems and applications have a limitation of maximum path length which they can handle. To guarantee proper building this length should not be exceeded.
"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/#how-to-fix-violations","title":"How to fix violations","text":"Rename the name of the file or shorten the path name.
"},{"location":"documentation/issue-providers/inspectcode/","title":"InspectCode","text":"Support for reading issues reported by JetBrains Inspect Code is implemented in the Cake.Issues.InspectCode addin.
To read issues from InspectCode log files the InspectCode issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n
Note
In addition to the InspectCode issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example contains a task which will run JetBrains InspectCode and write a log file and a task to read issues from the log file and write the number of warnings to the console. JetBrains InspectCode is installed using JetBrains.ReSharper.CommandLineTools
:
#tool \"nuget:?package=JetBrains.ReSharper.CommandLineTools\" // (1)!\n\nvar logPath = @\"c:\\build\\inspectcode.xml\";\nvar repoRootFolder = MakeAbsolute(Directory(\"./\"));\n\nTask(\"Analyze-Project\").Does(() =>\n{\n // Run InspectCode.\n var settings = new InspectCodeSettings() {\n OutputFile = logPath\n };\n\n InspectCode(repoRootPath.CombineWithFilePath(\"MySolution.sln\"), settings);\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Analyze-Project\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n InspectCodeIssuesFromFilePath(logPath),\n repoRootPath);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
using Cake.Common.Diagnostics;\nusing Cake.Core.IO;\nusing Cake.Core;\nusing Cake.Frosting;\nusing Cake.Common.Tools.InspectCode;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .InstallTool(\n new Uri(\n \"nuget:?package=JetBrains.ReSharper.CommandLineTools\")) // (1)!\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\inspectcode.xml\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n}\n\n[TaskName(\"Analyze-Project\")]\npublic sealed class AnalyzeProjectTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Run InspectCode.\n var settings = new InspectCodeSettings() {\n OutputFile = context.LogPath\n };\n\n context.InspectCode(\n context.RepoRootPath.CombineWithFilePath(\"MySolution.sln\"),\n settings);\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(AnalyzeProjectTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.InspectCodeIssuesFromFilePath(context.LogPath),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
The Cake.Issues.InspectCode addin provides the following features.
Tip: Running InspectCodeJetBrains InsepectCode can be run using the InspectCode alias.
"},{"location":"documentation/issue-providers/inspectcode/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Support for reading issues reported by markdownlint is implemented in the Cake.Issues.Markdownlint addin.
To call markdownlint-cli from a Cake script the Cake.Markdownlint addin can be used. To read issues from markdownlint-cli log files the markdownlint issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin \"Cake.Markdownlint\" // (1)!\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.Markdownlint&version=5.0.1\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
Note
In addition to the markdownlint issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Markdownlint\" Version=\"1.0.0\" /> // (1)!\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Markdownlint\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
1.0.0
with the desired version.The following example contains a task which will run markdownlint-cli and write a log file and a task to read issues from the log file and write the number of warnings to the console:
Cake .NET ToolCake Frosting build.cakevar logPath = @\"c:\\build\\markdownlint.log\";\nvar repoRootFolder = MakeAbsolute(Directory(\"./\"));\n\nTask(\"Lint-Documentation\").Does(() =>\n{\n // Run markdownlint-cli.\n var settings =\n MarkdownlintNodeJsRunnerSettings.ForDirectory(\n context.RepoRootPath.Combine(\"docs\"));\n settings.OutputFile = logPath;\n settings.ThrowOnIssue = false;\n RunMarkdownlintNodeJs(settings);\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Lint-Documentation\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n MarkdownlintIssuesFromFilePath(\n logPath,\n MarkdownlintCliLogFileFormat),\n repoRootPath);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Common.IO;\nusing Cake.Core;\nusing Cake.Core.IO;\nusing Cake.Frosting;\nusing Cake.Markdownlint;\nusing Cake.Markdownlint.NodeJs;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\markdownlint.log\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n}\n\n[TaskName(\"Lint-Documentation\")]\npublic sealed class LintDocumentationTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Run markdownlint-cli.\n var settings =\n MarkdownlintNodeJsRunnerSettings.ForDirectory(\n context.RepoRootPath.Combine(\"docs\"));\n settings.OutputFile = context.LogPath;\n settings.ThrowOnIssue = false;\n context.RunMarkdownlintNodeJs(settings);\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(LintDocumentationTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.MarkdownlintIssuesFromFilePath(\n context.LogPath,\n context.MarkdownlintCliLogFileFormat()),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/issue-providers/markdownlint/features/","title":"Features","text":"The Cake.Issues.Markdownlint addin provides the following features.
Tip: Running markdownlintmarkdownlint-cli can be run with the Cake.Markdownlint addin.
"},{"location":"documentation/issue-providers/markdownlint/features/#basic-features","title":"Basic features","text":"options.resultVersion
set to 1.--json
parameter.IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
(3)IIssue.EndColumn
IIssue.FileLink
(4)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
(5)IIssue.PriorityName
(6)IIssue.Rule
IIssue.RuleUrl
(7)IIssue.MessageText
Warning
Support for reading warnings reported by MsBuild is implemented in the Cake.Issues.MsBuild.
To read issues from MsBuild log files you need to import the MsBuild issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n
Note
In addition to the MsBuild issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example contains a task which will call MsBuild to build the solution and write a binary log file and a task to read issues from the binary log file and write the number of warnings to the console:
Cake .NET ToolCake Frosting build.cakevar logPath = @\"c:\\build\\msbuild.xml\";\nvar repoRootPath = MakeAbsolute(Directory(\"./\"));\n\nTask(\"Build-Solution\").Does(() =>\n{\n // Build solution.\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n logPath.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Build-Solution\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n MsBuildIssuesFromFilePath(\n logPath,\n MsBuildBinaryLogFileFormat),\n repoRootPath);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Core;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\msbuild.xml\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n}\n\n[TaskName(\"Build-Solution\")]\npublic sealed class BuildSolutionTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Build solution.\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n context.LogPath.FullPath);\n context.DotNetBuild(\n context.RepoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(BuildSolutionTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.MsBuildIssuesFromFilePath(\n context.LogPath,\n context.MsBuildBinaryLogFileFormat()),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
Tip
When using MSBuildSettings.BinaryLogger
property to write a binary log, the version of the binary log format written depends on the version of the .NET SDK.
To avoid the risk of breaking builds when the .NET SDK is updated and introduces a new binary log format, which is not supported in the used version of Cake.Issues.MsBuild, the binary logger instance shipped as part of Cake.Issues.MsBuild is used in the above example.
"},{"location":"documentation/issue-providers/msbuild/features/","title":"Features","text":"The Cake.Issues.MsBuild addin provides the following features.
Tip: Running MSBuildMSBuild can be run using the DotNet aliases or MsBuild aliases.
"},{"location":"documentation/issue-providers/msbuild/features/#basic-features","title":"Basic features","text":"CA*
) and StyleCop (SA*
) warnings.IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
(3)IIssue.EndColumn
IIssue.FileLink
(4)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
(5)IIssue.MessageText
CA*
) and StyleCop (SA*
) warnings. Support for additional rules can be added through a custom MsBuildAddRuleUrlResolverSupport for reading issues in SARIF format is implemented in the Cake.Issues.Sarif addin.
The Cake.Issues.Sarif addin provides the following features.
"},{"location":"documentation/issue-providers/sarif/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Support for reading issues reported by Terraform validate command is implemented in the Cake.Issues.Terraform addin.
The Cake.Issues.Terraform addin provides the following features.
Tip: Running TerraformTerraform can be run with Cake.Terraform addin.
"},{"location":"documentation/issue-providers/terraform/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Pull request addins implement specific Pull Request Systems and allow the Cake Issues addin to write found issues as comments to pull requests.
Tip
See How to implement pull request systems for instruction on how to implement support for additional pull request systems.
"},{"location":"documentation/pull-request-systems/appveyor/","title":"AppVeyor","text":"Support for AppVeyor is implemented in the Cake.Issues.PullRequests.AppVeyor addin.
The Cake.Issues.PullRequests.AppVeyor addin reports issues as messages to AppVeyor builds.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/appveyor/features/#basic-features","title":"Basic features","text":"The Cake.Issues.PullRequests.AppVeyor addin doesn't support any additional capabilities.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/appveyor/examples/github-pullrequest-integration/","title":"GitHub pull request integration","text":"This example shows how to write AppVeyor messages created by Cake.Issues to GitHub pull requests.
Issues reported as messages to AppVeyor builds can be written to a GitHub pull request using GitHub Pull Request Notification in your appveyor.yml
file.
The following example will write a comment to the GitHub pull request containing all issues which were posted as message to the AppVeyor build:
notifications:\n- provider: GitHubPullRequest\n template: \"{{#passed}}:white_check_mark:{{/passed}}{{#failed}}:x:{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})<p>Build messages:</p><ul>{{#jobs}}{{#messages}}<li>{{message}}<br/>{{details}}</li>{{/messages}}{{/jobs}}</ul>\"\n
The output will look similar to this:
"},{"location":"documentation/pull-request-systems/appveyor/examples/write-messages/","title":"Writing message to AppVeyor","text":"To report issues as messages to an AppVeyor build, the AppVeyor addin needs to be imported. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AppVeyor&version=5.0.1\n
Note
In addition to the AppVeyor pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AppVeyor\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
This example shows how to report issues as messages to an AppVeyor build using the AppVeyorBuilds alias:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToAppVeyor\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AppVeyorBuilds(),\n repoRootPath);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToAppVeyor\")]\npublic sealed class ReportIssuesToAppVeyorTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AppVeyorBuilds(),\n repoRootPath);\n }\n}\n
The output will look similar to this:
"},{"location":"documentation/pull-request-systems/azure-devops/","title":"Azure DevOps","text":"Support for Azure DevOps is implemented in the Cake.Issues.PullRequests.AzureDevOps addin.
The Cake.Issues.PullRequests.AzureDevOps addin provides the following features.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/azure-devops/features/#basic-features","title":"Basic features","text":"The Cake.Issues.PullRequests.AzureDevOps addin supports the following capabilities.
For detailed instructions how to connect using the different methods see Setup instructions.
"},{"location":"documentation/pull-request-systems/azure-devops/setup/","title":"Setup","text":"This page describes the different ways how the Cake.Issues.PullRequests.AzureDevOps addin can be setup.
"},{"location":"documentation/pull-request-systems/azure-devops/setup/#ntlm-authentication","title":"NTLM authentication","text":"Info
NTLM authentication is only available for on-premise Azure DevOps Server.
To authenticate with NTLM you can use the AzureDevOpsAuthenticationNtlm alias from the Cake.AzureDevOps addin.
The user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
Basic authentication is only available for on-premise Azure DevOps Server.
To authenticate with basic authentication you can use the AzureDevOpsAuthenticationBasic alias from the Cake.AzureDevOps addin and need to Configure Azure DevOps Server to use Basic Authentication.
The user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
To authenticate with an personal access token you can use the AzureDevOpsAuthenticationPersonalAccessToken alias from the Cake.AzureDevOps addin.
If you want to use the Cake.Issues.PullRequests.AzureDevOps addin with an personal access token see Authenticate access with personal access tokens for Azure DevOps for instructions how to create a personal access token.
The access token needs to have the scope Code (read and write)
set and the user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
OAuth authentication is only available for Azure DevOps Service.
If you want to use the Cake.Issues.PullRequests.AzureDevOps addin from an Azure Pipelines you can authenticate using the OAuth token provided to the build. For this you need to enable the Allow scripts to access the OAuth token option on the build definition.
To authenticate you can use the AzureDevOpsAuthenticationOAuth alias from the Cake.AzureDevOps addin.
The user under which the build runs, named <projectName> Build Service (<organizationName>)
(e.g. Cake.Issues-Demo Build Service (cake-contrib)
), needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
Entra authentication is only available for Azure DevOps Service.
To authenticate with Entra ID you can use the AzureDevOpsAuthenticationAzureActiveDirectory alias from the Cake.AzureDevOps addin.
The user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/azure-devops/examples/azure-pipelines/","title":"Using with Azure Pipelines","text":"To write issues as comments to Azure DevOps pull requests, the Azure DevOps addin needs to be imported. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n#addin \"Cake.AzureDevOps\" // (1)!\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins and the Cake.AzureDevOps addin need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example shows a task which will call the AzureDevOpsPullRequests alias to connect to the pull request using the environment variables provided by Azure Pipelines.:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToPullRequest\").Does(() =>\n{\n var repoRootFolder =\n MakeAbsolute(Directory(\"./\"));\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AzureDevOpsPullRequests(),\n repoRootPath);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath =\n context.MakeAbsolute(context.Directory(\"./\"));\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AzureDevOpsPullRequests(),\n repoRootPath);\n }\n}\n
Info
Please note that you'll need to setup your Azure Pipelines build to Allow scripts to access the OAuth token and need to setup proper permissions.
See OAuth authentication from Azure Pipelines for details.
"},{"location":"documentation/pull-request-systems/azure-devops/examples/pullrequest-id/","title":"Using with pull request id","text":"To write issues as comments to Azure DevOps pull requests, the Azure DevOps addin needs to be imported. To determine the remote repository URL the Cake.Git addin can be used. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin \"Cake.Git\" // (1)!\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n#addin \"Cake.AzureDevOps\" // (1)!\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins and the Cake.AzureDevOps addin need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Git\" Version=\"1.0.0\" /> // (1)!\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
1.0.0
with the desired version.The following example shows a task which will first determine the remote repository URL and with this information call the AzureDevOpsPullRequests alias, which will authenticate through NTLM to an on-premise Azure DevOps Server instance:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToPullRequest\").Does(() =>\n{\n var repoRootPath =\n MakeAbsolute(Directory(\"./\"));\n var currentBranch =\n GitBranchCurrent(repoRootPath);\n var repoRemoteUrl =\n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var pullRequestId = 123;\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AzureDevOpsPullRequests(\n repoRemoteUrl,\n pullRequestId,\n AzureDevOpsAuthenticationNtlm()),\n repoRootPath);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\nusing Cake.Git;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath =\n context.MakeAbsolute(context.Directory(\"./\"));\n var currentBranch =\n context.GitBranchCurrent(repoRootPath);\n var repoRemoteUrl = \n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var pullRequestId = 123;\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AzureDevOpsPullRequests(\n repoRemoteUrl,\n pullRequestId,\n context.AzureDevOpsAuthenticationNtlm()),\n repoRootPath);\n }\n}\n
"},{"location":"documentation/pull-request-systems/azure-devops/examples/repository-information/","title":"Using with repository remote url and source branch name","text":"To write issues as comments to Azure DevOps pull requests, the Azure DevOps addin needs to be imported. To determine the remote repository URL and source branch of the pull request the Cake.Git addin can be used. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin \"Cake.Git\" // (1)!\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n#addin \"Cake.AzureDevOps\" // (1)!\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins and the Cake.AzureDevOps addin need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Git\" Version=\"1.0.0\" /> // (1)!\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
1.0.0
with the desired version.The following example shows a task which will first determine the remote repository URL and source branch of the pull request and with this information call the AzureDevOpsPullRequests alias, which will authenticate through NTLM to an on-premise Azure DevOps Server instance:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToPullRequest\").Does(() =>\n{\n var repoRootFolder =\n MakeAbsolute(Directory(\"./\"));\n var currentBranch =\n GitBranchCurrent(repoRootFolder);\n var repoRemoteUrl =\n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var sourceBranchName = currentBranch.CanonicalName;\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AzureDevOpsPullRequests(\n repoRemoteUrl,\n sourceBranchName,\n AzureDevOpsAuthenticationNtlm()),\n repoRootFolder);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\nusing Cake.Git;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath =\n context.MakeAbsolute(context.Directory(\"./\"));\n var currentBranch =\n context.GitBranchCurrent(repoRootPath);\n var repoRemoteUrl = \n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var sourceBranchName = currentBranch.CanonicalName;\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AzureDevOpsPullRequests(\n repoRemoteUrl,\n sourceBranchName,\n context.AzureDevOpsAuthenticationNtlm()),\n repoRootPath);\n }\n}\n
"},{"location":"documentation/pull-request-systems/github-actions/","title":"GitHub Actions","text":"Support for GitHub Actions is implemented in the Cake.Issues.PullRequests.GitHubActions addin.
The Cake.Issues.PullRequests.GitHubActions addin creates annotations from issues when running on GitHub actions.
"},{"location":"documentation/pull-request-systems/github-actions/features/#basic-features","title":"Basic features","text":"The Cake.Issues.PullRequests.GitHubActions addin doesn't support any additional capabilities.
To report issues as annotations to a GitHub Actions build, the GitHub Actions addin needs to be imported. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.GitHubActions&version=5.0.1\n
Note
In addition to the GitHub Actions pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.GitHubActions\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
This example shows how to report issues as annotations to GitHubActions build using the GitHubActionsBuilds alias:
Cake .NET ToolCake Frosting build.cakeTask(\"ReportIssuesToGitHubActions\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n GitHubActionsBuilds(),\n repoRootFolder);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToAppVeyor\")]\npublic sealed class ReportIssuesToAppVeyorTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.GitHubActionsBuilds(),\n repoRootPath);\n }\n}\n
The output will show up in the build log grouped by issue provider / run:
Additionally the issues show up as annotations:
Having issues available as annotations also means that they will be shown in pull requests on the related file / position:
"},{"location":"documentation/recipe/","title":"Overview","text":"Cake.Issues recipes provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
Integration of code analyzing and linting tools into a build pipeline often looks the similar, and differentiates mainly on the used linters, build and pull request systems. Cake.Issues recipes contain code to do all the parsing, integration with build and pull request systems for you, using the individual Cake.Issues addins. They support different linters based on the linting log files you pass it and integrate automatically with different build and pull request systems.
There are two flavors available:
Cake.Issues.Recipe
For Cake .NET Tool
Cake.Frosting.Issues.Recipe
For Cake Frosting
See supported tools for a list of supported linters, build servers and pull request systems.
"},{"location":"documentation/recipe/#bundled-addins","title":"Bundled addins","text":"Cake.Issues recipes will add the following addins to your build:
Cake.Issues.RecipeCake.Frosting.Issues.Recipe Addin Version Remarks Cake.Git 5.0.1 Only used ifRepositoryInfoProvider
type is set to RepositoryInfoProviderType.CakeGit
. See Git repository information configuration for details. Cake.Issues 5.0.1 Cake.Issues.MsBuild 5.0.1 Cake.Issues.InspectCode 5.0.1 Cake.Issues.Markdownlint 5.0.1 Cake.Issues.EsLint 5.0.1 Cake.Issues.Sarif 5.0.1 Cake.Issues.Reporting 5.0.1 Cake.Issues.Reporting.Generic 5.0.1 Cake.Issues.Reporting.Sarif 5.0.1 Cake.Issues.PullRequests 5.0.1 Cake.Issues.PullRequests.AppVeyor 5.0.1 Cake.Issues.PullRequests.AzureDevOps 5.0.1 Cake.Issues.PullRequests.GitHubActions 5.0.1 Cake.AzureDevOps 5.0.0 Addin Version Remarks Cake.Frosting.Git 5.0.1 Only used if RepositoryInfoProvider
type is set to RepositoryInfoProviderType.CakeGit
. See Git repository information configuration for details. Cake.Issues 5.0.1 Cake.Frosting.Issues.MsBuild 5.0.1 Cake.Frosting.Issues.InspectCode 5.0.1 Cake.Frosting.Issues.Markdownlint 5.0.1 Cake.Frosting.Issues.EsLint 5.0.1 Cake.Frosting.Issues.Sarif 5.0.1 Cake.Frosting.Issues.Reporting 5.0.1 Cake.Frosting.Issues.Reporting.Generic 5.0.1 Cake.Frosting.Issues.Reporting.Sarif 5.0.1 Cake.Frosting.Issues.PullRequests 5.0.1 Cake.Frosting.Issues.PullRequests.AppVeyor 5.0.1 Cake.Frosting.Issues.PullRequests.AzureDevOps 5.0.1 Cake.Frosting.Issues.PullRequests.GitHubActions 5.0.1 Cake.AzureDevOps 5.0.0"},{"location":"documentation/recipe/configuration/","title":"Configuration","text":"This page lists configuration properties which can be used to define the functionality and behavior of Cake.Issues recipes.
"},{"location":"documentation/recipe/configuration/#git-repository-information","title":"Git repository information","text":"Cake.Issues recipes require some information about current Git repository.
To define the Git provider in Cake.Issues.Recipe
set the global variable RepositoryInfoProvider
. To define the Git provider in Cake.Frosting.Issues.Recipe
pass the value to the constructor of IssueContext
.
The following providers are supported:
Provider DescriptionRepositoryInfoProviderType.CakeGit
Read repository information using Cake.Git addin. Requires system to be compatible with Cake.Git addin. RepositoryInfoProviderType.Cli
Read repository information using Git CLI. Requires Git CLI to be available in path. By default Cake.Git addin will be used.
"},{"location":"documentation/recipe/configuration/#general","title":"General","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters Property Default Value DescriptionOutputDirectory
BuildArtifacts
Path to the output directory. A relative path will be relative to the current working directory. BuildIdentifier
string.Empty
Identifier for the build run. If set this identifier will be used to identify to artifacts provided by the build if building on multiple configurations. IssuesContext.Parameters Property Default Value Description OutputDirectory
BuildArtifacts
Path to the output directory. A relative path will be relative to the current working directory. BuildIdentifier
string.Empty
Identifier for the build run. If set this identifier will be used to identify to artifacts provided by the build if building on multiple configurations."},{"location":"documentation/recipe/configuration/#input-files","title":"Input files","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.InputFiles Methods Description AddMsBuildXmlFileLoggerLogFilePath()
Adds a path to a MSBuild log file created by XmlFileLogger. AddMsBuildXmlFileLoggerLogFileContent()
Adds content of a MSBuild log file created by XmlFileLogger. AddMsBuildBinaryLogFilePath()
Adds a path to a MSBuild binary log file. AddMsBuildBinaryLogFileContent()
Adds content of a MSBuild binary log file. AddInspectCodeLogFilePath()
Adds a path to a JetBrains InspectCode log file. AddInspectCodeLogFileContent()
Adds content of a JetBrains InspectCode log file. AddMarkdownlintCliLogFilePath()
Adds a path to a markdownlint-cli log file. AddMarkdownlintCliLogFileContent()
Adds content of a markdownlint-cli log file. AddMarkdownlintCliJsonLogFilePath()
Adds a path to a markdownlint-cli log file writting with --json
. AddMarkdownlintCliJsonLogFileContent()
Adds content of a markdownlint-cli log file writting with --json
. AddMarkdownlintV1LogFilePath()
Adds a path to a markdownlint log file in version 1. AddMarkdownlintV1LogFileContent()
Adds content of a markdownlint log file in version 1. AddEsLintJsonLogFilePath()
Adds a path to a ESLint log file generated by the ESLint json formatter. AddEsLintJsonLogFileContent()
Adds content of a ESLint log file generated by the ESLint json formatter. AddSarifLogFilePath()
Adds a path to a SARIF log file. AddSarifLogFileContent()
Adds content of a SARIF log file. IssuesContext.Parameters.InputFiles Methods Description AddMsBuildXmlFileLoggerLogFilePath()
Adds a path to a MSBuild log file created by XmlFileLogger. AddMsBuildXmlFileLoggerLogFileContent()
Adds content of a MSBuild log file created by XmlFileLogger. AddMsBuildBinaryLogFilePath()
Adds a path to a MSBuild binary log file. AddMsBuildBinaryLogFileContent()
Adds content of a MSBuild binary log file. AddInspectCodeLogFilePath()
Adds a path to a JetBrains InspectCode log file. AddInspectCodeLogFileContent()
Adds content of a JetBrains InspectCode log file. AddMarkdownlintCliLogFilePath()
Adds a path to a markdownlint-cli log file. AddMarkdownlintCliLogFileContent()
Adds content of a markdownlint-cli log file. AddMarkdownlintCliJsonLogFilePath()
Adds a path to a markdownlint-cli log file writting with --json
. AddMarkdownlintCliJsonLogFileContent()
Adds content of a markdownlint-cli log file writting with --json
. AddMarkdownlintV1LogFilePath()
Adds a path to a markdownlint log file in version 1. AddMarkdownlintV1LogFileContent()
Adds content of a markdownlint log file in version 1. AddEsLintJsonLogFilePath()
Adds a path to a ESLint log file generated by the ESLint json formatter. AddEsLintJsonLogFileContent()
Adds content of a ESLint log file generated by the ESLint json formatter. AddSarifLogFilePath()
Adds a path to a SARIF log file. AddSarifLogFileContent()
Adds content of a SARIF log file."},{"location":"documentation/recipe/configuration/#report-creation","title":"Report creation","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.Reporting Property Default Value Description ShouldCreateFullIssuesReport
true
Indicates whether full issues report should be created. FullIssuesReportSettings
GenericIssueReportTemplate.HtmlDxDataGrid
template with DevExtremeTheme.MaterialBlueLight
theme. Settings for creating the full issues report. See Template Gallery for possible options. ShouldCreateSarifReport
true
Indicates whether a report in SARIF format should be created. ShouldReportIssuesToConsole
false
Indicates whether issues should be reported to the console. ReportToConsoleSettings
Settings for reporting issues to the console. IssuesContext.Parameters.Reporting Property Default Value Description ShouldCreateFullIssuesReport
true
Indicates whether full issues report should be created. FullIssuesReportSettings
GenericIssueReportTemplate.HtmlDxDataGrid
template with DevExtremeTheme.MaterialBlueLight
theme. Settings for creating the full issues report. See Template Gallery for possible options. ShouldCreateSarifReport
true
Indicates whether a report in SARIF format should be created. ShouldReportIssuesToConsole
false
Indicates whether issues should be reported to the console. ReportToConsoleSettings
Settings for reporting issues to the console."},{"location":"documentation/recipe/configuration/#build-server-integration","title":"Build server integration","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.BuildServer Property Default Value Description ShouldReportIssuesToBuildServer
true
Indicates whether issues should be reported to the build server. ShouldPublishFullIssuesReport
true
Indicates whether full issues report should be published as artifact to the build system. ShouldPublishSarifReport
true
Indicates whether report int SARIF format shoudl be published as artifact to the build system. ShouldCreateSummaryIssuesReport
true
Indicates whether summary issues report should be created. IssuesContext.Parameters.BuildServer Property Default Value Description ShouldReportIssuesToBuildServer
true
Indicates whether issues should be reported to the build server. ShouldPublishFullIssuesReport
true
Indicates whether full issues report should be published as artifact to the build system. ShouldPublishSarifReport
true
Indicates whether report int SARIF format shoudl be published as artifact to the build system. ShouldCreateSummaryIssuesReport
true
Indicates whether summary issues report should be created."},{"location":"documentation/recipe/configuration/#pull-request-integration","title":"Pull request integration","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.PullRequestSystem Property Default Value Description ShouldReportIssuesToPullRequest
true
Indicates whether issues should be reported to the pull request system. MaxIssuesToPost
null
Global number of issues which should be posted at maximum over all issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a global limit. MaxIssuesToPostAcrossRuns
null
Global number of issues which should be posted at maximum over all issue providers and across multiple runs. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a limit across multiple runs. MaxIssuesToPostForEachIssueProvider
100
Number of issues which should be posted at maximum for each issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't limit issues per issue provider. ProviderIssueLimits
Empty Issue limits for individual issue provider. The key must be the IIssue.ProviderType
of a specific provider to which the limits should be applied to. IssueFilters
Empty List of filter functions which should be applied before posting issues to pull requests. ShouldSetPullRequestStatus
true
Indicates whether a status on the pull request should be set if there are any issues found. ShouldSetSeparatePullRequestStatusForEachIssueProviderAndRun
true
Indicates whether a separate status should be set for issues of every issue provider and run. IssuesContext.Parameters.PullRequestSystem Property Default Value Description ShouldReportIssuesToPullRequest
true
Indicates whether issues should be reported to the pull request system. MaxIssuesToPost
null
Global number of issues which should be posted at maximum over all issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a global limit. MaxIssuesToPostAcrossRuns
null
Global number of issues which should be posted at maximum over all issue providers and across multiple runs. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a limit across multiple runs. MaxIssuesToPostForEachIssueProvider
100
Number of issues which should be posted at maximum for each issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't limit issues per issue provider. ProviderIssueLimits
Empty Issue limits for individual issue provider. The key must be the IIssue.ProviderType
of a specific provider to which the limits should be applied to. IssueFilters
Empty List of filter functions which should be applied before posting issues to pull requests. ShouldSetPullRequestStatus
true
Indicates whether a status on the pull request should be set if there are any issues found. ShouldSetSeparatePullRequestStatusForEachIssueProviderAndRun
true
Indicates whether a separate status should be set for issues of every issue provider and run."},{"location":"documentation/recipe/demos/","title":"Demos","text":"There are demo setups available for different combinations of build servers and repositories which you can fork and to which you can create pull requests to test the recipe functionality.
Recipe Build Server Repository Cake.Issues.Recipe Azure Pipelines Azure Repos"},{"location":"documentation/recipe/supported-tools/","title":"Supported tools","text":"Cake.Issues recipes support reading issues from different tools and integrates with different build and pull request systems.
"},{"location":"documentation/recipe/supported-tools/#tools","title":"Tools","text":"Cake.Issues recipes support reading issues from output of the following tools:
Cake.Issues.RecipeCake.Frosting.Issues.Recipe Tool Format IssuesParameters.InputFiles Method MsBuild MSBuild Extension Pack XmlFileLoggerAddMsBuildXmlFileLoggerLogFile*()
MsBuild Binary Log File AddMsBuildBinaryLogFile*()
JetBrains InspectCode (ReSharper) xml AddInspectCodeLogFile*()
markdownlint markdownlint-cli default format AddMarkdownlintCliLogFile*()
markdownlint markdownlint-cli with --json
AddMarkdownlintCliJsonLogFile*()
markdownlint markdownlint version 1 AddMarkdownlintV1LogFile*()
ESLint json formatter AddEsLintJsonLogFile*()
Any SARIF compatible tool SARIF AddSarifLogFile*()
Tool Format IssuesContext.Parameters.InputFiles Method MsBuild MSBuild Extension Pack XmlFileLogger AddMsBuildXmlFileLoggerLogFile*()
MsBuild Binary Log File AddMsBuildBinaryLogFile*()
JetBrains InspectCode (ReSharper) xml AddInspectCodeLogFile*()
markdownlint markdownlint-cli default format AddMarkdownlintCliLogFile*()
markdownlint markdownlint-cli with --json
AddMarkdownlintCliJsonLogFile*()
markdownlint markdownlint version 1 AddMarkdownlintV1LogFile*()
ESLint json formatter AddEsLintJsonLogFile*()
Any SARIF compatible tool SARIF AddSarifLogFile*()
Tip
See Supported tools for a list of tools supporting the SARIF format.
"},{"location":"documentation/recipe/supported-tools/#build-systems","title":"Build systems","text":"Cake.Issues recipes integrates with the following build systems:
AppVeyorAzure PipelinesGitHub ActionsCake.Issues recipes integrates with the following pull request systems:
Azure ReposGitHubCake.Issues recipes provide the following tasks to your build script:
Cake.Issues.RecipeCake.Frosting.Issues.Recipe Task Description IssuesBuildTasks propertyIssues
Main tasks for issue management integration. IssuesTask
Read-Issues
Reads issues from the provided log files. ReadIssuesTask
Create-FullIssuesReport
Creates issue report. CreateFullIssuesReportTask
Publish-IssuesArtifacts
Publish artifacts to build server. PublishIssuesArtifactsTask
Report-IssuesToBuildServer
Report issues to build server. ReportIssuesToBuildServerTask
Create-SummaryIssuesReport
Creates a summary issue report. CreateSummaryIssuesReportTask
Report-IssuesToPullRequest
Report issues to pull request. ReportIssuesToPullRequestTask
Set-PullRequestIssuesState
Set pull request status. SetPullRequestIssuesStateTask
Report-IssuesToConsole
Report issues to console. ReportIssuesToConsoleTask
Task Description Task type Issues
Main tasks for issue management integration. Cake.Frosting.Issues.Recipe.
IssuesTask
Read-Issues
Reads issues from the provided log files. Cake.Frosting.Issues.Recipe.
ReadIssuesTask
Create-FullIssuesReport
Creates issue report. Cake.Frosting.Issues.Recipe.
CreateFullIssuesReportTask
Publish-IssuesArtifacts
Publish artifacts to build server. Cake.Frosting.Issues.Recipe.
PublishIssuesArtifactsTask
Report-IssuesToBuildServer
Report issues to build server. Cake.Frosting.Issues.Recipe.
ReportIssuesToBuildServerTask
Create-SummaryIssuesReport
Creates a summary issue report. Cake.Frosting.Issues.Recipe.
CreateSummaryIssuesReportTask
Report-IssuesToPullRequest
Report issues to pull request. Cake.Frosting.Issues.Recipe.
ReportIssuesToPullRequestTask
Set-PullRequestIssuesState
Set pull request status. Cake.Frosting.Issues.Recipe.
SetPullRequestIssuesStateTask
Report-IssuesToConsole
Report issues to console. Cake.Frosting.Issues.Recipe.
ReportIssuesToConsoleTask
"},{"location":"documentation/report-formats/","title":"Report Formats","text":"Report format addins implement specific report formats and allow the Cake Issues addin to create reports in the specific format.
Tip
See How to implement report format for instruction on how to implement support for additional report formats.
"},{"location":"documentation/report-formats/console/","title":"Console","text":"Support for printing issues to the console is implemented in the a Cake.Issues.Reporting.Console addin.
To report issues to the console the Console report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Console&version=5.0.1\n
Note
In addition to the Console report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Console\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will print issues logged as warnings by MsBuild to the console.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat),\n ConsoleIssueReportFormat(\n new ConsoleIssueReportFormatSettings\n {\n GroupByRule = true,\n ShowProviderSummary = true,\n ShowPrioritySummary = true\n }),\n repoRootPath,\n string.Empty);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.ConsoleIssueReportFormat(\n new ConsoleIssueReportFormatSettings\n {\n GroupByRule = true,\n ShowProviderSummary = true,\n ShowPrioritySummary = true\n }),\n repoRootPath,\n string.Empty);\n }\n}\n
"},{"location":"documentation/report-formats/console/features/","title":"Features","text":"The Cake.Issues.Reporting.Console addin provides the following features:
Reports:
Support for creating reports in any text based format like HTML or Markdown is implemented in the Cake.Issues.Reporting.Generic addin.
The Cake.Issues.Reporting.Generic addin provides the following features:
Info
See Template Gallery for a list of available out of the box and 3rd party templates.
"},{"location":"documentation/report-formats/generic/examples/","title":"Examples","text":"Info
If you create a universally usable custom template we're happy to package it with the addin. To have it included in the addin please create a pull request with your contribution.
To create custom HTML reports the Generic report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.1\n
Note
In addition to the Generic report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Generic\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will create a HTML report for issues logged as warnings by MsBuild using a custom template.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"c:\\repo\");\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new MSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile)\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\"),\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create HTML report using Diagnostic template.\n CreateIssueReport(\n new List<IIssueProvider>\n {\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat)\n },\n GenericIssueReportFormatFromFilePath(@\"c:\\ReportTemplate.cshtml\"),\n repoRootFolder,\n @\"c:\\report.html\");\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.GenericIssueReportFormatFromFilePath(@\"c:\\ReportTemplate.cshtml\"),\n repoRootPath,\n @\"c:\\report.html\");\n }\n}\n
The template looks like this:
ReportTemplate.cshtml@model IEnumerable<Cake.Issues.IIssue>\n\n<!DOCTYPE html>\n\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <meta charset=\"utf-8\" />\n <title></title>\n</head>\n<body>\n <table>\n <thead>\n <tr>\n <th scope=\"col\">AffectedFileRelativePath</th>\n <th scope=\"col\">Line</th>\n <th scope=\"col\">Message</th>\n <th scope=\"col\">Priority</th>\n <th scope=\"col\">Rule</th>\n <th scope=\"col\">RuleUrl</th>\n <th scope=\"col\">ProviderType</th>\n </tr>\n </thead>\n <tbody>\n @foreach (var issue in Model)\n {\n <tr>\n <td>@issue.AffectedFileRelativePath</td>\n <td>@issue.Line</td>\n <td>@issue.MessageText</td>\n <td>@issue.Priority</td>\n <td>@issue.RuleId</td>\n <td>@issue.RuleUrl</td>\n <td>@issue.ProviderType</td>\n </tr>\n }\n </tbody>\n </table>\n</body>\n</html>\n
The template retrieves an IEnumerable<Cake.Issues.IIssue>
as model.
Info
In custom templates functionality from the following assemblies are available:
To create HTML reports the Generic report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.1\n
Note
In addition to the Generic report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Generic\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will create a HTML report for issues logged as warnings by MsBuild.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create HTML report using Diagnostic template.\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat),\n GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootPath,\n @\"c:\\report.html\");\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootPath,\n @\"c:\\report.html\");\n }\n}\n
"},{"location":"documentation/report-formats/generic/templates/","title":"Template Gallery","text":"Template for a HTML report containing a rich data table view with sorting and search functionality powered by Simple-DataTables.
"},{"location":"documentation/report-formats/generic/templates/htmldatatable/#features","title":"Features","text":"Severity
, Project
, Path
, File
, Location
, Rule
, Message
.To create a report using the HTML Data Table template you can use the GenericIssueReportTemplate.HtmlDataTable enum value:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDataTable),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDataTable),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
"},{"location":"documentation/report-formats/generic/templates/htmldatatable/#options","title":"Options","text":"This template doesn't support any options.
"},{"location":"documentation/report-formats/generic/templates/htmldatatable/#demos","title":"Demos","text":"Info
You can use the source code as a template for your custom template.
Source code is available on GitHub.
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/","title":"HTML Diagnostic","text":"Template for a HTML report containing a list of all issues with all properties.
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/#features","title":"Features","text":"To create a report using the HTML diagnostic template you can use the GenericIssueReportTemplate.HtmlDiagnostic enum value:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDiagnostic),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDiagnostic),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/#options","title":"Options","text":"This template doesn't support any options.
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/#demos","title":"Demos","text":"Info
You can use the source code as a template for your custom template.
Source code is available on GitHub.
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/","title":"HTML DevExtreme Data Grid","text":"Template for a HTML report containing a rich data grid with sorting, filtering, grouping and search capabilities powered by DevExtreme.
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/#features","title":"Features","text":"Provider
, Severity
, Project
, Path
, File
, Location
, Rule
, Message
by default.To create a report using the HTML DevExtreme Data Grid template you can use the GenericIssueReportTemplate.HtmlDxDataGrid enum value:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/#options","title":"Options","text":"See HtmlDxDataGridOption for a list of possible options.
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/#demos","title":"Demos","text":"The following demo shows the template with its default options:
The template supports the teams defined in the DevExtremeTheme enumeration which can be set using the HtmlDxDataGridOption.Theme:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.Theme,\n DevExtremeTheme.MaterialBlueLight)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.Theme,\n DevExtremeTheme.MaterialBlueLight)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Visible columns can be defined using the ColumnNameVisible
option:
CreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.LineVisible,\n false)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.LineVisible,\n false)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Additional columns can be added using the HtmlDxDataGridOption.AdditionalColumns option.
Sorted columns can be defined using the HtmlDxDataGridOption.SortedColumns and the ColumnNameSortOder
options:
CreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.SortedColumns,\n new List<ReportColumn> { ReportColumn.RuleId })\n .WithOption(\n HtmlDxDataGridOption.RuleIdSortOrder,\n ColumnSortOrder.Descending )),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.SortedColumns,\n new List<ReportColumn> { ReportColumn.RuleId })\n .WithOption(\n HtmlDxDataGridOption.RuleIdSortOrder, \n ColumnSortOrder.Descending )),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Grouping can be defined using the HtmlDxDataGridOption.GroupedColumns option:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.GroupedColumns, \n new List<ReportColumn> { ReportColumn.RuleId })),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.GroupedColumns, \n new List<ReportColumn> { ReportColumn.RuleId })),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Exporting can be enabled using the HtmlDxDataGridOption.EnableExporting option:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.EnableExporting,\n true)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.EnableExporting,\n true)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Info
You can use the source code as a template for your custom template.
Source code is available on GitHub.
"},{"location":"documentation/report-formats/sarif/","title":"Sarif","text":"Support for creating SARIF compatible reports is implemented in the Cake.Issues.Reporting.Sarif addin.
To report issues to the console the SARIF report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Sarif&version=5.0.1\n
Note
In addition to the SARIF report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Sarif\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will create a SARIF report for issues logged as warnings by MsBuild.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create SARIF report.\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat,\n SarifIssueReportFormat(),\n repoRootPath,\n @\"c:\\report.sarif\");\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create SARIF report.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.SarifIssueReportFormat(),\n repoRootPath,\n @\"c:\\report.sarif\");\n }\n}\n
"},{"location":"documentation/report-formats/sarif/features/","title":"Features","text":"The Cake.Issues.Reporting.Sarif addin provides the following features:
Supports the following properties in the SARIF report:
Info
If you have written about Cake Issues we would like to hear from you. You can add it by creating a pull request here.
"},{"location":"documentation/resources/blog-posts/#2018","title":"2018","text":"Info
If you have done a presentation about Cake Issues we would like to hear from you. You can add it by creating a pull request here.
"},{"location":"documentation/resources/presentations/#2019","title":"2019","text":"The easiest way to use Cake Issues is by using one of the Recipe packages, which provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
"},{"location":"documentation/usage/#consuming-of-individual-addins","title":"Consuming Of Individual Addins","text":"The addins can be added individually to any Cake build and allow advanced customizations:
The Cake.Issues
addin can be used to break builds if specific issues were reported.
To break builds you need to import the following core addin:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n
Build.csproj<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Issues\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following task will fail the build if any issues were added to the issues
global variable:
// Global issues list into which issues need to be added.\nIEnumerable<IIssue> issues = null;\n\nTask(\"BreakBuildOnIssues\")\n .Description(\"Breaks build if any issues in the code are found.\")\n .Does(() =>\n{\n BreakBuildOnIssues(issues);\n});\n
Program.csusing Cake.Core;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n private readonly List<IIssue> _issues = [];\n\n public IEnumerable<IIssue> Issues { get { return _issues; } }\n\n public void AddIssues(IEnumerable<IIssue> issues)\n {\n _issues.AddRange(issues);\n }\n}\n\n[TaskName(\"BreakBuildOnIssues\")]\npublic sealed class BreakBuildOnIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n context.BreakBuildOnIssues(context.Issues);\n }\n}\n
"},{"location":"documentation/usage/creating-issues/creating-issues/","title":"Creating issues","text":"The Cake.Issues
addin can be used to create issues directly in the build script. This issues can for example be used to create reports.
To create issues you need to import the following core addin:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n
Build.csproj<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Issues\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
In the following task a new warning for the myfile.txt file on line 42 is created:
Cake .NET ToolCake Frosting build.cakeTask(\"Create-Issue\").Does(() =>\n{\n var issue =\n NewIssue(\n \"Something went wrong\",\n \"MyCakeScript\",\n \"My Cake Script\")\n .WithMessageInHtmlFormat(\"Something went <b>wrong</b>\")\n .WithMessageInMarkdownFormat(\"Something went **wrong**\")\n .InFile(\"myfile.txt\", 42)\n .WithPriority(IssuePriority.Warning)\n .Create();\n\n Information(\"Issue created with message: {0}\", issue.MessageText);\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-Issue\")]\npublic sealed class CreateIssueTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var issue =\n context.NewIssue(\n \"Something went wrong\",\n \"MyCakeScript\",\n \"My Cake Script\")\n .WithMessageInHtmlFormat(\"Something went <b>wrong</b>\")\n .WithMessageInMarkdownFormat(\"Something went **wrong**\")\n .InFile(\"myfile.txt\", 42)\n .WithPriority(IssuePriority.Warning)\n .Create();\n\n context.Information(\"Issue created with message: {0}\", issue.MessageText);\n }\n}\n
"},{"location":"documentation/usage/creating-reports/","title":"Creating Reports","text":"Tip
For more report format specific examples see Report Format Examples.
"},{"location":"documentation/usage/creating-reports/creating-reports/","title":"Creating reports","text":"To create report for issues you need to import the corresponding report format. In the following example the issue provider for reading warnings from MsBuild log files and generic report format is imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.1\n
Note
In addition to the report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Generic\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Afterwards you can define a task where you call the reporting addin with the desired issue provider and report format:
Cake .NET ToolCake Frosting build.cakeTask(\"Create-Report\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat),\n GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootFolder,\n @\"c:\\report.html\");\n});\n
Program.csusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-Report\")]\npublic sealed class CreateReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n context.GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootFolder,\n @\"c:\\report.html\");\n }\n}\n
"},{"location":"documentation/usage/reading-issues/","title":"Reading Issues","text":"Tip
For more issue provider specific examples see Issue Provider Examples.
"},{"location":"documentation/usage/reading-issues/file-linking/","title":"File linking","text":"File link settings can be defined while reading issues and are passed through the IIssue.FileLink
property to reporting formats, pull request systems and build server implementations:
var settings =\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n FileLinkSettings =\n IssueFileLinkSettingsForGitHubCommit(\n \"https://github.com/cake-contrib/Cake.Issues\",\n \"76a7cacef7ad4295a6766646d45c9b56\")\n }; \n\n var issues =\n ReadIssues(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n settings));\n
var settings =\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n FileLinkSettings =\n IssueFileLinkSettingsForGitHubCommit(\n \"https://github.com/cake-contrib/Cake.Issues\",\n \"76a7cacef7ad4295a6766646d45c9b56\")\n }; \n\n var issues =\n context.ReadIssues(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n settings));\n
Cake.Issues comes with out-of-the-box support for linking to files hosted on GitHub and Azure Repos, either for a specific branch or commit. Additionally there are aliases which can be used to define any custom pattern.
"},{"location":"documentation/usage/reading-issues/reading-issues/","title":"Reading issues","text":"The Cake.Issues
addin can be used to aggregate issues from different sources. This can for example be useful to break builds based on the reported issues.
To read issues you need to import at least one issue provider. In the following example the issue providers for reading warnings from MsBuild log files and from JetBrains InspectCode are imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n
Note
In addition to the issue providers the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Afterwards you can define a task where you call the core addin with the desired issue providers. The following example reads warnings and errors reported by MsBuild from a binary log and issues reported by JetBrains InspectCode:
Cake .NET ToolCake Frosting build.cakeTask(\"Read-Issues\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n var issues = ReadIssues(\n new List<IIssueProvider>\n {\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat),\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\")\n },\n repoRootFolder);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Read-Issues\")]\npublic sealed class ReadIssuesTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n var issues = context.ReadIssues(\n new List<IIssueProvider>\n {\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\")\n },\n repoRootFolder);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/usage/reading-issues/run-information/","title":"Additional run information","text":"If a build script needs to parse multiple log files from the same tool, e.g. because multiple MsBuild solutions were built, this can be done by calling the issue provider multiple times. If the results are read into the same list and shown on the same report, individual issues could not be assigned to any of the calls, since issue provider type and name are identical.
Starting with Cake.Issues 0.9.0 it is possible to pass additional run information while reading issues, which then will be stored with each issues in the IIssue.Run
property:
var issues = new List<IIssue>();\n\n// Parse issues from build of solution 1\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution1-msbuild.log\",\n MsBuildBinaryLogFileFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 1\"\n }\n )\n);\n\n// Parse issues from build of solution 2\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution2-msbuild.log\",\n MsBuildBinaryLogFileFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 2\"\n }\n )\n);\n
var issues = new List<IIssue>();\n\n// Parse issues from build of solution 1\nissues.AddRange(\n context.ReadIssues(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution1-msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 1\"\n }\n )\n);\n\n// Parse issues from build of solution 2\nissues.AddRange(\n context.ReadIssues(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution2-msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 2\"\n }\n )\n);\n
"},{"location":"documentation/usage/recipe/","title":"Recipe usage","text":"Cake.Issues recipes provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
Integration of code analyzing and linting tools into a build pipeline often looks the similar, and differentiates mainly on the used linters, build and pull request systems. Cake.Issues recipes contain code to do all the parsing, integration with build and pull request systems for you, using the individual Cake.Issues addins. They support different linters based on the linting log files you pass it and integrate automatically with different build and pull request systems.
There are two flavors available:
Cake.Issues.Recipe
For Cake .NET Tool
Cake.Frosting.Issues.Recipe
For Cake Frosting
The Cake.Frosting.Issues.Recipe package can be used to easily add issue management functionality to your Cake Frosting build.
Info
See Setting Up A New Frosting Project for instructions how to create a new Cake Frosting project.
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#add-cakefrostingissuesrecipe-to-your-cake-frosting-build","title":"Add Cake.Frosting.Issues.Recipe to your Cake Frosting build","text":"To use Cake.Frosting.Issues.Recipe in your Cake Frosting build you need to first add the NuGet package in your .csproj
file:
<PackageReference Include=\"Cake.Frosting.Issues.Recipe\" Version=\"5.0.1\" />\n
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#register-cakeissues-tasks","title":"Register Cake.Issues tasks","text":"To make Cake Issues tasks available to your Cake Frosting build you need to register them.
Add the following line to the bootstrapping code in the Main
method of your Cake Frosting project:
AddAssembly(Assembly.GetAssembly(typeof(IssuesTask)))\n
The following bootstrapping code registers the Cake Issues tasks and also installs JetBrains InspectCode:
using System;\nusing System.Reflection;\nusing Cake.Frosting;\nusing Cake.Frosting.Issues.Recipe;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .InstallTool(\n new Uri(\n \"nuget:?package=JetBrains.ReSharper.CommandLineTools\")) // (1)\n .AddAssembly(Assembly.GetAssembly(typeof(IssuesTask)))\n .Run(args);\n }\n}\n
In production code this dependency should be pinned to a specific version to make sure builds are deterministic and won't break due to updates.
See Reproducible Builds for details.
Cake.Frosting.Issues.Recipe provides a build context from which you need to inherit your custom build context. The build context contains configuration parameters, but also the state of the current running build, like for example all collected issues.
The following example creates a build context and defines that Cake Issues should use Cake.Git addin to determine state of the Git repository:
public class BuildContext : IssuesContext\n{\n public BuildContext(ICakeContext context)\n : base(context, RepositoryInfoProviderType.CakeGit)\n {\n }\n}\n
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#passing-issues-to-cakefrostingissuesrecipe","title":"Passing issues to Cake.Frosting.Issues.Recipe","text":"To make issues available to Cake.Frosting.Issues.Recipe you need pass the log files through the corresponding methods. The tasks need to also be a dependency of ReadIssuesTask
provided by Cake.Frosting.Issues.Recipe.
In the following example a new task is introduced which runs JetBrains InspectCode and passes the log file to Cake.Frosting.Issues.Recipe:
[TaskName(\"Run-InspectCode\")]\n[IsDependeeOf(typeof(ReadIssuesTask))]\npublic class RunInspectCodeTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n var inspectCodeLogFilePath = context.Parameters.OutputDirectory..CombineWithFilePath(\"inspectCode.log\");\n\n // Run JetBrains InspectCode\n context.InspectCode(\n context.State.RepositoryRootDirectory.Combine(\"src\").CombineWithFilePath(\"ClassLibrary1.sln\"),\n new InspectCodeSettings() {\n OutputFile = context.InspectCodeLogFilePath\n });\n\n // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe\n context.Parameters.InputFiles.AddInspectCodeLogFilePath(context.InspectCodeLogFilePath);\n }\n}\n
See configuration for a full list of available configuration parameters.
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#calling-issues-tasks","title":"Calling issues tasks","text":"Cake.Frosting.Issues.Recipe will add a bunch of tasks to your build script.
To add the issues functionality into your existing build pipeline you need to add ReadIssuesTask
to your pipeline.
In the following example the Default
task makes sure the main IssuesTask
is executed:
[TaskName(\"Default\")]\n[IsDependentOn(typeof(IssuesTask))]\npublic class DefaultTask : FrostingTask\n{\n}\n
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/","title":"Using Cake.Issues.Recipe","text":"The Cake.Issues.Recipe package can be used to easily add issue management functionality to your build script.
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/#add-cakeissuesrecipe-to-your-build-script","title":"Add Cake.Issues.Recipe to your build script","text":"To use Cake.Issues.Recipe in your build script you need to first load the NuGet package:
#load nuget:package=Cake.Issues.Recipe&version=5.0.1\n
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/#configuring-cakeissuesrecipe","title":"Configuring Cake.Issues.Recipe","text":"To make issues available to Cake.Issues.Recipe you need to set the corresponding configuration parameters.
In the following example a new task is introduced which depends on existing tasks which build a MsBuild solution and run JetBrains InspectCode. It will pass the MsBuild and InspectCode logfile to Cake.Issues.Recipe:
// Run issues task by default.\nTask(\"Configure-CakeIssuesRecipe\")\n .IsDependentOn(\"Build\")\n .IsDependentOn(\"Run-InspectCode\")\n .Does(() =>\n{\n IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(msBuildLogFilePath);\n IssuesParameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath);\n}\n
See configuration for a full list of available configuration parameters.
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/#calling-issues-tasks","title":"Calling issues tasks","text":"Cake.Issues.Recipe will add a bunch of tasks to your build script.
To add the issues functionality into your existing build pipeline you can make the Read-Issues
task dependent on the task which configures Cake.Issues.Recipe:
// Make sure build and linters run before issues task.\nIssuesBuildTasks.ReadIssuesTask\n .IsDependentOn(\"Configure-CakeIssuesRecipe\");\n
At some point you need to call the tasks provided by Cake.Isses.Recipe. In the following example the Default
task calls the main Issues
task:
// Run issues task by default.\nTask(\"Default\")\n .IsDependentOn(\"Issues\");\n
"},{"location":"documentation/usage/reporting-issues-to-pull-requests/","title":"Reporting Issues To Pull Requests","text":"Tip
For more pull request system specific examples see Pull Request System Examples
"},{"location":"documentation/usage/reporting-issues-to-pull-requests/custom-issue-filter/","title":"Custom issue filter","text":"You can define custom filters which are applied to issues before they are posted as comments to pull requests.
Tip: Filter to issues introduced with pull requestYou can use a custom filter to only have issues introduced with the current code posted to the pull request.
For this you need to store your log files as artifacts on your build system, then you can define a custom filter which retrieves the logs from the previous build, parses them using the appropriate issue provider and filters out any issues which were already existing in the previous build.
The following example will filter out all issues from the rule CA1000
from being posted to the pull request.
#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1 \n\nTask(\"ReportIssuesToPullRequest\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\"); \n\n var settings = new ReportIssuesToPullRequestFromIssueProviderSettings(repoRootFolder); \n\n // Add custom filter.\n settings.IssueFilters.Add(x => x.Where(issue => issue.RuleId != \"CA1000\")); \n\n ReportIssuesToPullRequest(\n new List<IIssueProvider>\n {\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat)\n },\n AzureDevOpsPullRequests(),\n settings);\n});\n
Build.csproj<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Program.csusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"ReportIssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\"); \n\n var settings = new ReportIssuesToPullRequestFromIssueProviderSettings(repoRootFolder); \n\n // Add custom filter.\n settings.IssueFilters.Add(x => x.Where(issue => issue.RuleId != \"CA1000\")); \n\n context.ReportIssuesToPullRequest(\n new List<IIssueProvider>\n {\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat())\n },\n context.AzureDevOpsPullRequests(),\n settings);\n }\n}\n
"},{"location":"documentation/usage/reporting-issues-to-pull-requests/report-issues-to-pull-requests/","title":"Report issues to pull requests","text":"To use report issues to pull requests you need to import the corresponding pull request system addin. In the following example the issue provider for reading warnings from MsBuild log files and support for Azure DevOps pull requests is imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n
Note
In addition to the pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Afterwards you can define a task where you call the core addin with the desired issue provider and pull request system:
Cake .NET ToolCake Frosting build.cake Task(\"ReportIssuesToPullRequest\").Does(() =>\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n ReportIssuesToPullRequest(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat),\n AzureDevOpsPullRequests(),\n repoRootFolder);\n });\n
Program.csusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"ReportIssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n context.ReportIssuesToPullRequest(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n context.AzureDevOpsPullRequests(),\n repoRootFolder);\n }\n}\n
"},{"location":"news/","title":"News","text":""},{"location":"news/2020/08/22/cake-issues-v090-released/","title":"Cake Issues v0.9.0 Released","text":"Cake Issues version 0.9.0 has been released. This is a major release bringing a lot of new features across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
While in previous versions most parts of Cake Issues was already targeting .NET Standard and with this could be executed on .NET Framework, .NET Core and Mono, Cake.Issues.Reporting.Generic
could only run on .NET Framework and Mono, but not on .NET Core. With this release Cake.Issues.Reporting.Generic
was ported to also run on .NET Core.
The migration was done by gep13 on his Twitch stream and you can watch work done in Stream 90 - Working on Cake.Issues.Recipe, Stream 91 - Working on Cake.Issues.Reporting.Generic and Gazorator and Stream 92 - Working on Cake.Issues.Reporting.Generic and Gazorator - Part 2.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#enhanced-issue-information","title":"Enhanced issue information","text":"The description for issues has been extended by additional information for column and ranges:
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
Existing issue providers have been updated to provide the additional information where available. See feature description for individual issue providers for which information a specific issue provider supports.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#file-linking","title":"File linking","text":"In previous versions Cake.Issues.Reporting.Generic
supported entries linking to the file on the source code provider (GitHub, Azure Repos, ...). With this release file linking infrastructure has been moved to the Cake.Issues
addin and can be used by any addin.
File link settings can be defined while reading issues and are passed through the new IIssue.FileLink
property to reporting formats, pull request systems and build server implementations:
var settings =\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n FileLinkSettings =\n IssueFileLinkSettingsForGitHubCommit(\n \"https://github.com/cake-contrib/Cake.Issues.Reporting.Generic\",\n \"76a7cacef7ad4295a6766646d45c9b56\")\n };\n\n var issues =\n ReadIssues(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n settings));\n
Cake.Issues
comes with out-of-the-box support for linking to files hosted on GitHub and Azure Repos, either for a specific branch or commit. Additionally there are aliases which can be used to define any custom pattern.
If a build script needed to parse multiple log files from the same tool, e.g. because multiple MsBuild solutions were built, this was currently possible by calling the issue provider multiple times. If the results were read into the same list and shown on the same report, individual issues could not be assigned to any of the calls, since issue provider type and name were identical. Starting with Cake.Issues 0.9.0 it is now possible to pass additional run information while reading issues, which then will be stored with each issues in the IIssue.Run
property:
var issues = new List<IIssue>();\n\n// Parse issues from build of solutions 1\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution1-msbuild.log\",\n MsBuildXmlFileLoggerFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 1\"\n }\n )\n);\n\n// Parse issues from build of solutions 2\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution2-msbuild.log\",\n MsBuildXmlFileLoggerFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 2\"\n }\n )\n);\n
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#improved-pull-request-integration","title":"Improved pull request integration","text":"In previous versions the text message of an issue was used to detect issues already reported in a previous run. This didn't work well for issues which contain information in the message which likely changes between runs, like e.g. line information. In this version a specific identifier, IIssue.Identifier
, is used which can be set by the issue provider.
When working with legacy code bases which contain a lot of existing issues, using something like Cake.Issues can be hard, since it will notify about every existing issue if something is changed in a file. To work around this issue it is possible to limit issues which will be posted to pull request systems. In previous versions it was already possible to limit the total number of issues, the number of issues for every issue provider and the total number of issues across multiple run. With 0.9.0 it will additionally be possible to limit the number of issues for specific issue providers for either a single or across multiple runs. This allows advanced scenarios like posting a maximum of 10 MsBuild issues every run, but not more than 20 in total across all runs.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#get-everything-together","title":"Get everything together","text":"Cake.Issues.Recipe, the Cake Recipe script which you can integrate into your build script for easy integration of full feature issue management, has been updated to version 0.4.0, bringing all the new features of Cake.Issues 0.9.0.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 0.9.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
MarkdownlintLogFileFormat
alias has been renamed to MarkdownlintV1LogFileFormat
(#116).ReportIssuesToPullRequest
alias which accepts an issue provider, or a list of issue providers, and settings requires now settings of type IReportIssuesToPullRequestFromIssueProviderSettings
instead of ReportIssuesToPullRequestSettings
to provider additional functionality, like support for File linking and Support for passing additional run information.CreateIssueReport
alias which accepts an issue provider, or a list of issue providers, and settings requires now settings of type ICreateIssueReportFromIssueProviderSettings
instead of CreateIssueReportSettings
to provider additional functionality, like support for File linking and Support for passing additional run information.HtmlDxDataGridOption.FileLinkSettings
has been removed. File link settings can now be defined while reading the issues. For details see File linking. (#265).HtmlDxDataGridOption.JSZipLocation
has been split into HtmlDxDataGridOption.JsZipLocation
and HtmlDxDataGridOption.JsZipVersion
(#320).For details see release notes of the individual addins:
Version 0.9.1 of Cake Issues and Cake.Issues.PullRequests.AzureDevOps have been released. These are minor releases containing improvements and bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
With 0.8.0 file links was implemented in Cake.Issues.Reporting.Generic and worked for any issues passed to the report. With 0.9.0 file link infrastructure was moved to Cake.Issues. File link settings can now be set while reading issues, and are passed through the IIssue.FileLink
property to reports and pull request systems.
While this solution works for issues read by an issue provider, where file link settings can be passed to the ReadIssues
alias, it become much more complicated for issues created using the NewIssue
alias, where an URL can be set, which needs to be resolved manually before.
Cake.Issues 0.9.1 adds an WithFileLinkSettings
method to IIssueBuilder
where a file link setting object can be passed which does resolve the URL.
Cake Issues 0.9.0 added support for line ranges and column information. With 0.9.0 the Azure DevOps pull request integration didn't use this information while posting comments to pull requests. Cake.Issues.PullRequests.AzureDevOps 0.9.1 fixes this and will post comments for line and column ranges if they are available on an issue.
","boost":0.5},{"location":"news/2020/09/19/cake-issues-v091-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues and Cake.Issues.PullRequests.AzureDevOps 0.9.1 are compatible with version 0.9.0 without any breaking changes. To update to the new version bump the version of the specific addins.
","boost":0.5},{"location":"news/2020/09/24/cake-issues-recipe-v042-released-bringing-support-for-github-actions/","title":"Cake Issues Recipe v0.4.2 released, bringing support for GitHub Actions","text":"Version 0.4.2 of Cake Issues Recipe has been released bringing support for GitHub Actions.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake.Issues.Recipe brings support for running under GitHub Actions. Currently supported feature is writing of issues to build server which will show up in the build log grouped by issue provider / run:
Additionally the issues show up as annotations:
Having issues available as annotations also means that they will be shown in pull requests on the related file / position:
It's planned to support remaining features like providing full issue report as artifact in a future release.
Info
Support for GitHub Actions integration is currently only available in Cake.Issues.Recipe, but not as a standalone addin. It's planned to additionally provide a standalone addin which can be used outside of Cake.Issues.Recipe in the future.
","boost":0.5},{"location":"news/2020/09/24/cake-issues-recipe-v042-released-bringing-support-for-github-actions/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Recipe 0.4.2 is compatible with version 0.4.x without any breaking changes. To update to the new version bump the version in your build script.
","boost":0.5},{"location":"news/2020/09/27/new-github-actions-addin/","title":"New GitHub Actions addin","text":"A new Cake.Issues.PullRequest.GitHubActions addin has been released which brings integration with GitHub Actions and GitHub pull requests.
Cake.Issues.PullRequest.GitHubActions addin creates annotations from issues when running on GitHub Actions:
These annotations will also be shown in pull requests on the related file / position, bringing first class integration for GitHub pull requests to Cake.Issues:
This integration was first released in Cake.Issues.Recipe 0.4.2 and has now been moved to its own addin, which can also be used outside of Cake.Issues.Recipe.
","boost":0.5},{"location":"news/2020/10/09/cake-issues-pullrequests-v091-released/","title":"Cake Issues PullRequests v0.9.1 Released","text":"Version 0.9.1 of Cake.Issues.PullRequests has been released. This is a minor releases containing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version fixes a bug where if MaxIssuesToPost
or MaxIssuesToPostAcrossRuns
was set to 0 all issues were posted to the pull request instead of none.
Cake.Issues.PullRequests 0.9.1 is compatible with version 0.9.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2020/10/20/cake-issues-msbuild-v091-released/","title":"Cake Issues MsBuild v0.9.1 Released","text":"Version 0.9.1 of MsBuild support for Cake.Issues has been released. This is a minor release containing improvements.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Until now MsBuild support did read warnings from MsBuild log files. Starting with version 0.9.1 it will also return errors. Reading of errors has been implemented for MsBuildBinaryLogFileFormat
and MsBuildXmlFileLoggerFormat
. For errors IIssue.Priority
will be set to IssuePriority.Error
.
Info
To keep previous behavior result after reading the issues can be filtered for IIssue.Priority == IIssuePriority.Warning
.
Cake.Issues.MsBuild 0.9.1 is compatible with version 0.9.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2020/12/01/cake-issues-recipe-v044-released-bringing-support-for-eslint/","title":"Cake Issues Recipe v0.4.4 released, bringing support for ESLint","text":"Version 0.4.4 of Cake Issues Recipe has been released bringing support for ESLint.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions. For details see full release notes.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake.Issues.Recipe brings support for issues reported by ESLint. Currently supported are files generated using the ESLint json formatter
","boost":0.5},{"location":"news/2020/12/01/cake-issues-recipe-v044-released-bringing-support-for-eslint/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Recipe 0.4.4 is compatible with version 0.4.x without any breaking changes. To update to the new version bump the version in your build script.
","boost":0.5},{"location":"news/2021/07/27/new-addin-for-terraform-support/","title":"New addin for Terraform support","text":"A new Cake.Issues.Terraform addin has been released which adds support for reading issues from Terraform validate
command.
Cake.Issues.Terraform addin brings support for Terraform to the Cake.Issues ecosystem. It allows to read the output of the Terraform validate
command. Together with other Cake.Issues addins it is possible to create powerful infrastructure as code pipelines which ensure quality standards by validating Terraform files before merging or deploying the changes. When using a pull requests workflow it is also possible to have the issues reported by Terraform validate automatically reported as comments to pull request.
More than 4 years after the first commit for Cake.Prca, the predecessor of Cake Issues, we're happy to announce that Cake Issues version 1.0.0 has been released. This is a major release bringing a lot of new features across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 1.x.
","boost":0.5},{"location":"news/2021/07/28/cake-issues-v100-released/#support-for-cake-frosting","title":"Support for Cake Frosting","text":"All addins can be used with Cake Frosting.
Cake Issues addins have always been self-contained, shipping with all required dependencies, to provide the best user experience. While this approach makes sense for Cake script runners, it makes things more complex than required when running under Cake Frosting. This is especially true for the Cake.Issues.Reporting.Generic addin, which uses Razor engine to generate the reports.
It was therefore decided to release separate versions of the Cake.Issues.Reporting.Generic addin for the different script runners:
Cake.Frosting.Issues.Reporting.Generic has the additional benefit for the user that it gives the user full control of what exact version of dependencies should be used. In the future more Cake Issues addins might be released in Frosting specific packages.
","boost":0.5},{"location":"news/2021/07/28/cake-issues-v100-released/#support-for-arbitrary-values-in-an-issue","title":"Support for arbitrary values in an issue","text":"Specific issue providers might have additional information for which no equivalent does exist on IIssue
. These kind of information can now be stored in the IIssue.AdditionalInformation
property.
While there are aliases to get provider type name (e.g. MsBuildIssuesProviderTypeName), this information was in previous versions not available through the IIssueProvider
interface. There is a new IIssueProvider.ProviderType
property which can be used to retrieve the provider type.
A new PDF export has been added to the HtmlDxDataGrid
template of the Cake.Issues.Reporting.Generic
addin.
Starting with Cake Issues 1.0.0 the three core addins Cake.Issues
, Cake.Issues.PullRequests
and Cake.Issues.Reporting
will be always released together. For that source code for the addin has been merged in the Cake.Issues repository. Please open any issues related to any of the core addins in the Cake.Issues issue tracker.
Cake.Issues 1.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
IIssueProvider
was extended with an additional ProviderType
property. For issue providers inheriting from BaseIssueProvider
no action is required to keep the same behavior as with previous versions, with the type name used as provider type.Info
Cake.Recipe has not been updated to 1.0 yet.
For details see release notes of the individual addins:
Version 1.0.1 of ESLint support for Cake.Issues has been released. This is a minor release containing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
When an issue reported by ESLint didn't contain line or column information, or rule was set to null
an exception ocurred while parsing the file. This release fixes this and can now also correctly parse issues without position or rule information.
Cake.Issues.EsLint 1.0.1 is compatible with version 1.0.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/","title":"Cake Issues Recipe v1.0.0 Released, bringing support for Cake Frosting","text":"Hard on the heels of the announcement for release 1.0 of Cake.Issues addins, we're happy to announce release 1.0 of the recipe script for Cake.Issues.
This is a major release bringing support for Cake Frosting and other new features.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Cake Issues recipe has been updated to use latest 1.x versions of the Cake.Issues addins which support Cake 1.x.
See announcement for release 1.0 of Cake.Issues addins for features added in the individual addins.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#support-for-cake-frosting","title":"Support for Cake Frosting","text":"Additionally to the existing Cake.Issues.Recipe package, which works fine for Cake script runners, there's a new Cake.Frosting.Issues.Recipe package suitable for builds using Cake Frosting.
See Using Cake.Frosting.Issues.Recipe for an example.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#support-for-environments-not-compatible-with-cakegit-addin","title":"Support for environments not compatible with Cake.Git addin","text":"In previous versions Cake.Issues recipes had used Cake.Git addin to determine state of the Git repository. While this works in most cases, there are some environments where Cake.Git addin currently does not work.
Starting with this version it is now possible to define if Cake.Git addin or Git CLI should be used.
See Git repository information configuration for details.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#define-settings-for-issue-providers","title":"Define settings for issue providers","text":"Previous versions of Cake.Issues recipes used default settings for reading issues from the passed log files. This made it impossible to parse log files which for example are created by tools running in containers, as they have a root path different to the repository root.
This version introduced methods to pass log files to the recipe scripts, which additionally to the log file path accept a settings object.
The new implementation also supports other use-cases like reading multiple files with the same issues provider, but different settings (e.g. run information).
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues Recipes 1.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
IssuesParameters.InputFiles.MsBuildXmlFileLoggerLogFilePath
property:IssuesParameters.InputFiles.MsBuildXmlFileLoggerLogFilePath = @\"c:\\build\\msbuild.log\";\n
With 1.0 the IssuesParameters.InputFiles.AddMsBuildXmlFileLoggerLogFile()
method needs to be called instead:
IssuesParameters.InputFiles.AddMsBuildXmlFileLoggerLogFile(@\"c:\\build\\msbuild.log\");\n
For details see full release notes
","boost":0.5},{"location":"news/2021/08/11/cake-issues-recipes-v110-released/","title":"Cake Issues Recipes v1.1.0 released","text":"Version 1.1.0 of Cake Issues recipes have been released adding support to customize report generation.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake Issues recipes adds a new FullIssuesReportSettings
configuration parameter which allows to customize the generated issue report. See Report creation parameters for details.
The following example enables exporting of the report when using Cake.Issues.Recipe:
IssuesParameters.Reporting.FullIssuesReportSettings\n .WithOption(HtmlDxDataGridOption.EnableExporting, true)\n
The following example enables exporting of the report when using Cake.Frosting.Issues.Recipe:
context.Parameters.Reporting.FullIssuesReportSettings\n .WithOption(HtmlDxDataGridOption.EnableExporting, true)\n
","boost":0.5},{"location":"news/2021/08/11/cake-issues-recipes-v110-released/#updated-addins","title":"Updated addins","text":"Cake.Git
has been updated to version 1.1.0 which comes with an updated version of LibGit2Sharp which adds support for Ubuntu 20.
See Cake.Git 1.1.0 release notes for details.
","boost":0.5},{"location":"news/2021/08/11/cake-issues-recipes-v110-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake Issues recipes 1.1.0 are compatible with version 1.x without any breaking changes. To update to the new version bump the version in your build.
","boost":0.5},{"location":"news/2021/08/19/cake-issues-recipes-v120-released/","title":"Cake Issues Recipes v1.2.0 released","text":"Version 1.2.0 of Cake Issues recipes have been released adding support to customize issue reporting to pull requests.
This post shows the highlights included in this release. For details see full release notes. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake Issues recipes adds several new configuration parameter which allows to customize how issues are reported to pull requests. See Pull request integration parameters for details.
The following example limits the number of issues posted to pull requests to 20
when using Cake.Issues.Recipe:
IssuesParameters.PullRequestSystem.MaxIssuesToPost = 20;\n
The following example limits the number of issues posted to pull requests to 20
when using Cake.Frosting.Issues.Recipe:
context.Parameters.PullRequestSystem.MaxIssuesToPost = 20;\n
","boost":0.5},{"location":"news/2021/08/19/cake-issues-recipes-v120-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake Issues recipes 1.2.0 are compatible with version 1.x without any breaking changes. To update to the new version bump the version in your build.
","boost":0.5},{"location":"news/2021/08/29/new-addin-for-printing-issues-to-console/","title":"New addin for printing issues to console","text":"A new Cake.Issues.Reporting.Console addin has been released which allows to output issues to the console.
Cake.Issues.Reporting.Console addin can be used to print issues to the console and is built on top of the excellent Errata library by Patrik Svensson.
Its main focus is to annotate source code with issues:
It currently only supports issues containing line and column information. Output can be grouped by rule, like in the image above, or individual entries for every issue.
Beside printing issues it can also show summary tables.
There's one summary which shows the number of issues for everyprovider and run:
Another summary shows the number of issues by priority for every provider and run:
","boost":0.5},{"location":"news/2021/08/31/cake-issues-markdownlint-v110-released/","title":"Cake Issues Markdownlint v1.1.0 Released","text":"Version 1.1.0 of Markdownlint support for Cake.Issues has been released. This is a minor release adding features and improvements.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Since version 0.28.0 markdownlint-cli supports a --json
option to output result in JSON format. This version adds support for this format through the MarkdownlintCliJsonLogFileFormat alias.
This release of Cake.Issues.Markdownlint enhances the MarkdownlintCliLogFileFormat to provide column information if reported by markdownlint.
","boost":0.5},{"location":"news/2021/08/31/cake-issues-markdownlint-v110-released/#recipe-packages","title":"Recipe packages","text":"Cake Issues recipes have been released in version 1.3.0 shipping with Cake.Issues.Markdownlint 1.1.0 and adding support for markdownlint-cli JSON files.
","boost":0.5},{"location":"news/2021/08/31/cake-issues-markdownlint-v110-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Markdownlint 1.1.0 is compatible with version 1.0.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/","title":"Cake Issues Reporting Console v0.3.0 released, adding support for all Cake runners","text":"Version 0.3.0 of Cake.Issues.Reporting.Console has been released. This is a minor release adding features and improvements.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Starting with this release Cake.Issues.Reporting.Console will target .NET Standard 2.0 instead of .NET 5.0 and therefore will support all Cake runners.
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/#improved-reporting","title":"Improved reporting","text":"Provider report is now rendered in different colors for the individual bars, making it easier to read:
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/#errata-060","title":"Errata 0.6.0","text":"Underlying Errata library has been updated to 0.6.0, containing additional bug fixes and rendering improvements.
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Reporting.Console 0.3.0 is compatible with previous versions without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2022/12/10/cake-issues-v200-released/","title":"Cake Issues v2.0.0 Released","text":"After several months with beta releases Cake Issues version 2.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 2.x.
Target framework have been updated to .NET Core 3.1, .NET 5 and .NET 6 to be in line with Cake. See Sunsetting of .NET Framework and .NET Core runners in Cake 2.0 for details.
","boost":0.5},{"location":"news/2022/12/10/cake-issues-v200-released/#support-for-msbuild-binary-logs-version-9","title":"Support for MsBuild binary logs version 9","text":"Support for binary logs in version 9 has been added to Cake.Issues.MsBuild
.
Cake.Issues 2.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
5
. Older version are still supported for deserialization.ProviderIssueIssueLimits
has been renamed to ProviderIssueLimits
IIssue.Rule
has been renamed to IIssue.RuleId
IIssue
was extended with an additional RuleName
property.For details see release notes of the individual addins:
Cake Issues version 3.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 3.x.
Target framework have been updated to .NET 6 and .NET 7 to be in line with Cake.
","boost":0.5},{"location":"news/2023/07/22/cake-issues-v300-released/#support-for-msbuild-binary-logs-version-16","title":"Support for MsBuild binary logs version 16","text":"Support for binary logs in version 16 has been added to Cake.Issues.MsBuild
.
Cake.Issues.MsBuild
now will automatically provide links for Roslynator and SonarLint rules. Links for CA
rules have updated to link to learn.microsoft.com
.
Cake.Issues 3.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
StringPathExtensions.IsValideRepositoryFilePath
has been renamed to StringPathExtensions.IsValidRepositoryFilePath
BaseRuleDescription.Rule
has been made immutable after initializationDupFinderLogFilePaths
is no longer available. To keep using DupFinder you need to manually add Cake.Issues.DupFinder
and add issues using the AddIssues
method.For details see release notes of the individual addins:
Version 3.1.0 of Cake Issues recipes have been released adding support for creating of reports in SARIF format.
This post shows the highlights included in this release. For details see full release notes. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake Issues recipes adds a new configuration parameter which allows to create reports in SARIF format allowing further processing in a lot of different tools also supporting the SARIF standard. See Report parameters for details.
If running on Azure Pipelines the generated SARIF file is uploaded so that it will be shown in the SARIF SAST Scans Tab extension.
","boost":0.5},{"location":"news/2023/08/16/cake-issues-recipes-v310-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake Issues recipes 3.1.0 are compatible with version 3.x without any breaking changes. To update to the new version bump the version in your build.
","boost":0.5},{"location":"news/2023/12/23/cake-issues-v400-released/","title":"Cake Issues v4.0.0 Released","text":"Cake Issues version 4.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 4.x.
Target framework have been updated to .NET 6, .NET 7 and .NET 8 to be in line with Cake.
","boost":0.5},{"location":"news/2023/12/23/cake-issues-v400-released/#switch-to-systemtextjson-for-serialization","title":"Switch to System.Text.Json for serialization","text":"For serialization / deserialization of issues LitJson was used internally. With Cake.Issues 4.0 internal code has been changed to use System.Text.Json classes.
The change should not have any impact for users.
","boost":0.5},{"location":"news/2023/12/23/cake-issues-v400-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"While Cake.Issues 4.0.0 is a breaking release, there are no breaking changes beside the update to Cake 4.x and the changes to target framework version.
For details see release notes
","boost":0.5},{"location":"news/2024/01/14/alignment-of-addin-lifecycles/","title":"Alignment of addin lifecycles","text":"Cake Issues has a modular architecture consisting of multiple addins. Historically every addin had its own independent release lifecycle. Starting with the next release work will begin to have all addins share the same release lifecycle.
When Cake Issues started all three core addins (Cake.Issues
, Cake.Issues.Reporting
and Cake.Issues.PullRequsts
) and every issue provider, report format and pull request system addin were released on their own schedule, allowing fast iterations of individual components. With the release of Cake Issues 1.0 the release lifecycle of the three core addins have been aligned, resulting in a simplified release process.
Starting with the next release we'll begin to move also the remaining issue provider, report format and pull request system addins into the main Cake Issues repository and have them released together with the core addins.
","boost":0.5},{"location":"news/2024/02/21/cake-issues-v410-released/","title":"Cake Issues v4.1.0 Released","text":"Cake Issues version 4.1.0 has been released with improvements for Cake Frosting and support for latest MsBuild binary log format.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Cake.Frosting.Issues.Reporting and Cake.Frosting.Issues.PullRequests have been released as optimized version of the Cake.Issues.Reporting
and Cake.Issues.PullRequests
for Cake Frosting.
These addins come with a dependency to the core Cake.Issues
addin, allowing it to be consumed as transitive dependency.
Support for binary logs in version 18 has been added to Cake.Issues.MsBuild
.
As announced in Alignment of addin lifecycles work as started to move addins into the main Cake Issues repository.
Starting with this release the following addins will be released together with the core addins:
Cake.Issues 4.1.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/14/cake-issues-v420-released/","title":"Cake Issues v4.2.0 Released","text":"Cake Issues version 4.2.0 has been released introducing a new issue provider for SARIF compatible files.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
A new Cake.Issues.Sarif addin has been released which adds support for reading issues in SARIF format.
See New addin for reading SARIF files for details.
","boost":0.5},{"location":"news/2024/04/14/cake-issues-v420-released/#improvement-for-cake-frosting","title":"Improvement for Cake Frosting","text":"Optimized versions for Cake Frosting have been released for the following addins:
These addins come with a dependency to the core addins, allowing the core addins to be consumed as transitive dependencies.
","boost":0.5},{"location":"news/2024/04/14/cake-issues-v420-released/#alignment-of-release-lifecycle","title":"Alignment of release lifecycle","text":"As announced in Alignment of addin lifecycles work as started to move addins into the main Cake Issues repository.
Starting with this release the following addins will be released together with the core addins:
Cake.Issues 4.2.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/14/new-addin-for-reading-sarif-files/","title":"New addin for reading SARIF files","text":"A new Cake.Issues.Sarif addin has been released which adds support for reading issues in SARIF format.
SARIF is an industry standard format for the output of static analysis tools. With the introduction of SARIF support through the Cake.Issues.Sarif addin any tool which can output results in SARIF format can now be used together with Cake Issues.
See Supported Tools for an updated list of supported tools.
The addins is available in a version for Cake .NET Tool (Cake.Issues.Sarif) and Cake Frosting (Cake.Frosting.Issues.Sarif).
","boost":0.5},{"location":"news/2024/04/16/cake-issues-v421-released/","title":"Cake Issues v4.2.1 Released","text":"Cake Issues version 4.2.1 has been released with compatibility fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
As a side-effect of moving all addins to the central Cake Issues repository, AssemblyVersion
of every has been set to the release version.
Addins are backwards compatible though to latest major version, which was no longer possible with this change.
This release fixes this by setting the AssemblyVersion
to the major version (currently 4.0.0
).
Cake.Issues 4.2.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/20/cake-issues-v430-released/","title":"Cake Issues v4.3.0 Released","text":"Cake Issues version 4.3.0 has been released with support for MsBuild binary log format version 20.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 20 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.3.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/25/cake-issues-v431-released/","title":"Cake Issues v4.3.1 Released","text":"Cake Issues version 4.3.1 has been released bringing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes an exception if an issue provider reports an issue across multiple lines and the end column is before the start column.
","boost":0.5},{"location":"news/2024/04/25/cake-issues-v431-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.3.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/05/18/cake-issues-v440-released/","title":"Cake Issues v4.4.0 Released","text":"Cake Issues version 4.4.0 has been released with improvements for Cake Frosting.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for implicit usings has been added to the Cake Frosting addins.
If <ImplicitUsings>enable</ImplicitUsings>
is set in a Cake Frosting build, namespaces for Cake Issues addins are implicitly added, resulting in a similar experience as when using Cake .NET Tool, where aliases can be used directly without the requirements to first add using
statements.
The HTML DevExtreme Data Grid template now supports search boxes in filter dropdowns.
See Header Filter Customization in DataGrid for details.
","boost":0.5},{"location":"news/2024/05/18/cake-issues-v440-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.4.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/05/23/cake-issues-v450-released/","title":"Cake Issues v4.5.0 Released","text":"Cake Issues version 4.5.0 has been released adding support for build breaking.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
New BreakBuildOnIssues aliases have been introduced to fail builds when issues are found.
See build breaking for an example.
","boost":0.5},{"location":"news/2024/05/23/cake-issues-v450-released/#possibility-to-define-license-for-html-devextreme-data-grid","title":"Possibility to define license for HTML DevExtreme Data Grid","text":"Starting with version 23.2
DevExtreme no longer comes with a free community license. HTML DevExtreme Data Grid template will stay on version 23.1
for this reason.
If you have a DevExtreme license you can pass it to the new DevExtremeLicenseKey
option and update to a newer version using the DevExtremeVersion
option.
Cake.Issues 4.5.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/05/24/cake-issues-v451-released/","title":"Cake Issues v4.5.1 Released","text":"Cake Issues version 4.5.1 has been released containing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes verbose output of Cake.Issues.PullRequests
for provider issue limits.
Cake.Issues 4.5.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/06/24/cake-issues-v460-released/","title":"Cake Issues v4.6.0 Released","text":"Cake Issues version 4.6.0 has been released with improvements for SARIF reports.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
A new option SarifIssueReportFormatSettings.ExistingIssues has been introduced which allows to pass in a list of known issues not related to current code changes, resulting in the baselineState property being set in the resulting SARIF report.
This property is for example be used in the SARIF viewer extension for Azure Pipelines as filter option.
The following new settings options have been added:
SarifIssueReportFormatSettings property Output property Description Guid automationDetails.guid Unique, stable identifier for the run BaselineGuid run.baselineGuid String equal to Guid of a previous run CorrelationGuid automationDetails.correlationGuid Guid shared by all runs of the same type","boost":0.5},{"location":"news/2024/06/24/cake-issues-v460-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.6.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/16/cake-issues-v470-released/","title":"Cake Issues v4.7.0 Released","text":"Cake Issues version 4.7.0 has been released with detailed line information for SARIF issue provider and support for MsBuild binary log format version 21.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 21 has been added to Cake.Issues.MsBuild
.
Cake.Issues.Sarif
has been enhanced to also provide the following IIssue
properties if available:
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
Cake.Issues 4.7.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/17/cake-issues-v471-released/","title":"Cake Issues v4.7.1 Released","text":"Cake Issues version 4.7.1 has been released with bugfixes for SARIF reports
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes two bugs in Cake.Issues.Reporting.Sarif
:
0
as ruleIndex
instead of 1
originalUriBaseIds
should end with a slash as defined in SARIF Specification 2.1.0 \u00a73.14.14.Cake.Issues 4.7.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/18/cake-issues-v472-released/","title":"Cake Issues v4.7.2 Released","text":"Cake Issues version 4.7.2 has been released containing bug fixes for generic reporting addin.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes an bug in Cake.Issues.Reporting.Generic
where it was not possible to overwrite version of JsPdf version used in HTML DevExtreme Data Grid template.
Cake.Issues 4.7.2 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/19/cake-issues-v480-released/","title":"Cake Issues v4.8.0 Released","text":"Cake Issues version 4.8.0 has been released with improvements for SARIF issue provider.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
In previous releases the SARIF issue provider used the tool name defined in the SARIF file for a specific run as issue provider. This has the advantage that if multiple SARIF files from different sources are read, every issue has a different issue provider name, which reflects the original tool.
But it can also have side-effect, for example that different states are reported to pull request depending if run is successful or not (see cake-contrib/Cake.Issues.Recipe#477), because the actual issue provider name is only known once there are issues reported.
This release introduces a new option SarifIssuesSettings.UseToolNameAsIssueProviderName to define whether the tool name reported in the SARIF log or a fixed value should be used as issue provider name.
","boost":0.5},{"location":"news/2024/07/19/cake-issues-v480-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.8.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/25/cake-issues-v490-released/","title":"Cake Issues v4.9.0 Released","text":"Cake Issues version 4.9.0 has been released with bugfixes for SARIF report format and Terraform issue provider.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes an issue where entries in a SARIF report were marked as updated if branch or commit in file link has changed.
To achieve this, a new constructor for the generic IIssueComparer
has been introduced, which allows to define which IIssue
properties should be ignored for the comparison.
A bug has been fixed where root directory was not correctly determined when running on Linux or macOS.
","boost":0.5},{"location":"news/2024/07/25/cake-issues-v490-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.9.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/30/cake-issues-v4100-released/","title":"Cake Issues v4.10.0 Released","text":"Cake Issues version 4.10.0 has been released with support for MsBuild binary log format version 22.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 20 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.10.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/08/20/cake-issues-v4101-released/","title":"Cake Issues v4.10.1 Released","text":"Cake Issues version v4.10.1 has been released with bugfixes for Cake Frosting and file linking
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes dependencies of the following Cake Frosting optimized NuGet packages:
This release fixes an issue that file links are created for issues which are not related to a file.
","boost":0.5},{"location":"news/2024/08/20/cake-issues-v4101-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues v4.10.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/10/06/cake-issues-v4110-released/","title":"Cake Issues v4.11.0 Released","text":"Cake Issues version 4.11.0 has been released with support for MsBuild binary log format version 23.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 23 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.11.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/11/05/cake-issues-v4120-released/","title":"Cake Issues v4.12.0 Released","text":"Cake Issues version 4.12.0 has been released with support for MsBuild binary log format version 24.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 24 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.12.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/12/02/cake-issues-v500-released/","title":"Cake Issues v5.0.0 Released","text":"Cake Issues version 5.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 5.x.
Target framework have been updated to .NET 8 and .NET 9 to be in line with Cake.
","boost":0.5},{"location":"news/2024/12/02/cake-issues-v500-released/#improvements-for-cake-frosting","title":"Improvements for Cake Frosting","text":"Cake.Frosting.Issues.PullRequests.AzureDevOps
now references Cake.Frosting.AzureDevOps
, a version of Cake.AzureDevOps
, optimized for Cake Frosting.
Instead of shipping client assemblies to access Azure DevOps as part of Cake.AzureDevOps
, Cake.Frosting.AzureDevOps
references the corresponding NuGet packages, which for example allows to control version of the libraries used.
Transitive dependencies which contain known security vulnerabilities have been updated to newer versions where the vulnerabilities are fixed.
","boost":0.5},{"location":"news/2024/12/02/cake-issues-v500-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 5.0.0 is a breaking release, which means that there is a small change that changes to your build script are required.
For details see release notes
","boost":0.5},{"location":"news/2024/12/17/cake-issues-v501-released/","title":"Cake Issues v5.0.1 Released","text":"Cake Issues version 5.0.1 has been released containing bug fixes for Cake Frosting addins
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes dependencies of the following Cake Frosting optimized NuGet packages:
Cake.Issues 4.7.2 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/12/21/new-website/","title":"New website","text":"Today a new version of the Cake Issues website has been published.
The Cake Issues website was introduced 2017 as a static website built using Wyam, like the Cake website. Using Wyam allowed to add full API documentation and other features like list of addins or overview of open issues across all addins.
Wyam is no longer maintained, with Statiq as its successor. Unfortunately also the deployment pipeline for the Cake Issues website stopped working in 2023, resulting in the website no longer receiving updates.
Since the introduction of the Cake Issues website seven years ago, the Cake website also has been improved, among other things, with a dedicated page for each addin listing the aliases the addin provides. These improvements made a full API documentation on Cake Issues website somehow redundant.
With .NET API documentation no longer being a requirement there are much more tooling options available. The choice was made to use Material for MkDocs, which comes with a lot of features for writing technical documentation.
One of the features of the new website is support for multiple versions using mike. https://cakeissues.net/latest/
will always point to the documentation of the latest released version. https://cakeissues.net/develop/
points to the documentation of the current development branch. Beside that there's now a version selector in the header to show documentation for any old version.
2024 had been an amazing year for Cake Issues. In this post we'll look back to what had been achieved in 2024.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#alignment-of-addin-lifecycles","title":"Alignment of addin lifecycles","text":"2024 started with an announcement to consolidate all Cake Issue addins into the main Cake.Issues GitHub repository, which has been finished by now.
Beside having all addins share a release lifecycle, having them in a single repository also simplified maintenance work and release process. This resulted in a total of 20 releases of Cake Issues in 2024, including one major release with 5.0.0, bringing constant improvements and bugfixes.
Core Cake.Issues
addin has seen a steady, and stronger than 2023, rise of downloads during 2024, resulting in nearly 1 million downloads by the end of the year:
See NuGet Trends for details.
The individual addins had a different age, some up to 7 years old, written for .NET Framework. As part of the consolidation of all addins in a single mono-repository effort was made to unify and modernize the code base across all addins.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#new-addins","title":"New addins","text":"With the introduction of Cake.Issues.Sarif a lot of additional tools supporting the SARIF standard are now supported by Cake Issues as listed on Supported Tools.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#improvements-for-cake-frosting","title":"Improvements for Cake Frosting","text":"Several improvements were released during 2024 for running Cake Issues with Cake Frosting.
For all addins a NuGet package optimized for running with Cake Frosting is now available. These NuGet packages have dependencies to Cake, Cake Issues core addins or any other required dependency defined, which gives full control about the dependency, their version and update behavior to the user through the standard .NET project system.
These packages also support implicit usings improving discoverability of aliases for build authors. Implicit usings can be enabled by setting <ImplicitUsings>enable</ImplicitUsings>
in the csproj file of a build.
The end of 2024 saw also the relaunch of Cake Issues website, which has been updated to modern standards and tooling. Effort has also been put into content to improve discoverability of documentation for users. Examples and documentation have also been updated to latest Cake Issues and .NET version.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#thanks","title":"Thanks","text":"\u2764 Huge thanks to our community! All what had been achieved in 2024 would not have been possible without the support and contributions of the community! \u2764
People contributing to Cake Issues in 2024:
Cake Recipe Packages
Cake Issues recipes provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
It handles all the parsing, integration with build and pull request systems for you, using the individual Cake Issues addins.
Recipes
Read issues provided by tools
The ReadIssues
aliases can be used for reading issues reported by a linter to tool using an issue provider.
There are overloads for reading using a single or multiple issue provider.
Aliases
Create issues in your build
The NewIssue
aliases can be used for creating issues in the build script.
Aliases
Support for file links
Support for creating links to file & location on source code hosting system (GitHub, Azure Repos, etc).
Aliases
Issue serialization
Support for serializing and deserializing created issues and issues read from tools.
Aliases
Support for multiple message formats
Support for reading issues in multiple formats (Plain text, Markdown, HTML) if supported by issue provider.
Support for run information
Support for passing additional run information to identify specific runs.
Fail builds on reported issues
The BreakBuildOnIssues
aliases can be used for failing builds if specific issues were reported.
There are overloads for failing if issues of certain minimum priority or issue providers are found, or by passing any custom function.
Aliases
Create reports
The CreateIssueReport
aliases can be used for creating reports in a supported reporting format.
There are overloads for reading issues from a single or multiple issue provider or for passing an existing list of issues.
Aliases
Add comments to pull requests
The ReportIssuesToPullRequest
aliases can be used for writing issues as comments to pull requests.
There are overloads for reading issues from a single or multiple issue provider or for passing an existing list of issues.
Aliases
Report issues to build runs
The ReportIssuesToPullRequest
aliases can be used for reporting issues to build runs.
There are overloads for reading issues from a single or multiple issue provider or for passing an existing list of issues.
Aliases
Issue filters
Support for passing custom issue filter routines.
Setting
Limit reported issues
Advanced support to limit number of maximum issues per run, across multiple runs or per issue provider through settings.
Settings
Automatic comment resolving
If supported by the pull request system, comments for issues are automatic resolved if fixed in subsequent commits.
The Cake Issues addins are built in a modular architecture, allowing to easily enhance it for supporting additional analyzers, linters, report formats and pull request systems.
"},{"location":"documentation/how-cake-issues-works/#cakeissues-addin","title":"Cake.Issues addin","text":"The Cake.Issues
addin provides aliases for creating issues or reading issues using one or more issue providers.
Support for different code analyzers and linters is provided through issue provider addins which cover a wide range of linters and tools.
The issues are read into IIssue objects which then can be passed to Cake.Issues.Reporting addin, Cake.Issues.PullRequests addin or further processed in the build script.
The use of issue provider addins, which contain the parsing logic for individual tool output formats, and the use of IIssue as common data structure, allows to abstract the tooling output from other concerns like integration with build systems, pull request workflow or the creation of reports.
"},{"location":"documentation/how-cake-issues-works/#cakeissuesreporting-addin","title":"Cake.Issues.Reporting addin","text":"The Cake.Issues.Reporting
addin provides aliases for creating reports for issues which are read or have been created using the Cake.Issues addin.
Support for different report formats is provided through report format addins.
"},{"location":"documentation/how-cake-issues-works/#cakeissuespullrequests-addin","title":"Cake.Issues.PullRequests addin","text":"The Cake.Issues.PullRequests
addin provides aliases for reporting issues which are read or have been created using the Cake.Issues addin as comments to pull requests or builds.
Support for different pull request systems is provided through pull request system addins.
"},{"location":"documentation/overview/","title":"Introduction","text":"The Cake.Issues addins for the Cake build automation system offer an extensive and flexible solution for reading linting issues.
Cake.Issues redefines issue management within the Cake build system by offering a comprehensive, universal, and extensible solution. The unique capabilities of the addins empower development teams to enforce coding standards, generate insightful reports, seamlessly incorporate various linting tools, and streamlining the integration with pull requests. With its modular architecture and extensive set of aliases, Cake.Issues provides a future-proof infrastructure for issue management in Cake builds, fostering a more efficient and adaptable development process.
"},{"location":"documentation/overview/#unique-problem-solving","title":"Unique Problem Solving","text":"Some examples how Cake.Issues can help development teams to improve code quality.
"},{"location":"documentation/overview/#break-build-on-linting-issues","title":"Break build on linting issues","text":"Cake.Issues provides a seamless integration, allowing you to enforce coding standards by breaking builds when linting issues are detected.
Breaking builds
"},{"location":"documentation/overview/#pull-requests-integration","title":"Pull Requests integration","text":"Ensure linting issues are promptly addressed by having them reported as comments on pull requests. Cake.Issues bridges the gap between linting tools and version control systems, fostering efficient collaboration during code reviews.
Integrate with pull request systems
"},{"location":"documentation/overview/#reports","title":"Reports","text":"Craft detailed and visually appealing reports for linting issues directly within your Cake build. The addins facilitates easy identification and resolution of linting concerns, enhancing the overall code quality.
Creating Reports
"},{"location":"documentation/overview/#universal-compatibility","title":"Universal Compatibility","text":""},{"location":"documentation/overview/#diverse-linting-tool-support","title":"Diverse Linting Tool Support","text":"Regardless of the linting tools you use, Cake.Issues ensures that you're not left out. Cake.Issues supports a variety of analyzers and linters, allowing you to incorporate new tools effortlessly while maintaining integration with existing ones.
Supported Tools
"},{"location":"documentation/overview/#build-system-agnosticism","title":"Build System Agnosticism","text":"Embrace the freedom to choose the build system that best suit your needs. If your current build system lacks tasks for reporting issues in pull requests, Cake.Issues steps in to fill that void seamlessly. In the case of using multiple CI services, Cake.Issues guarantees a consistent feature set across all of them.
Supported Build and pull request systems
"},{"location":"documentation/overview/#unprecedented-extensibility","title":"Unprecedented Extensibility","text":""},{"location":"documentation/overview/#modular-architecture","title":"Modular Architecture","text":"The Cake.Issues addin breaks away from the norm by offering a modular architecture. Comprising over 15 distinct addins, it presents a cohesive solution through more than 75 aliases for Cake builds, providing unparalleled flexibility.
Architecture
"},{"location":"documentation/overview/#extensible-infrastructure","title":"Extensible Infrastructure","text":"Designed with extensibility in mind, Cake.Issues provides extension points for supporting additional analyzers, linters,report formats, and code review systems. This adaptability ensures that your build scripts can evolve with the ever-changing landscape of development tools.
Documentation
"},{"location":"documentation/supported-tools/","title":"Supported Tools","text":"This pages lists tools known to be working with Cake Issues (1)
To build this a package we are using Cake.
On Windows PowerShell run:
./build\n
On OSX/Linux run:
./build.sh\n
"},{"location":"documentation/contributing/how-to-contribute/","title":"How to contribute","text":"The repositories are using GitFlow with default configuration. Development is happening on develop
branch.
To contribute:
develop
.For getting started see issues marked with Up-for-grabs
in the individual repositories.
See Cake.Recipe documentation how to create a new release of this addin.
"},{"location":"documentation/extending/","title":"Extending","text":"Cake Issues can easily be extended with additional Issue Provider, Report Formats and Pull Request System integrations.
"},{"location":"documentation/extending/testing/","title":"Testing","text":"The Cake.Issues.Testing package provides different helper classes for writing test cases for issue provider, report format or pull request system addins.
API Documentation on fuget.org
"},{"location":"documentation/extending/issue-provider/categories/","title":"Alias categories","text":"Issue provider aliases should use the IssuesAliasConstants.MainCakeAliasCategory and IssuesAliasConstants.IssueProviderCakeAliasCategory constants for defining their category:
[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyIssueProviderAliases\n{\n [CakeMethodAlias]\n [CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\n public static IIssueProvider MyIssueProvider(\n this ICakeContext context)\n {\n }\n}\n
"},{"location":"documentation/extending/issue-provider/helper/","title":"Helper","text":"The following helpers are provider by Cake.Issues
for simplifying implementation of issue providers:
Cake.Issues provides infrastructure to get links to files on source code hosts like GitHub or Azure Repos. This infrastructure can be used inside issue providers to generate file links which can be used inside the issue messages:
protected override IEnumerable<IIssue> InternalReadIssues()\n{\n var result = new List<IIssue>();\n\n var filePath = \"foo.cs\";\n var line = 10;\n\n var fileLink = \n this.Settings.FileLinkSettings.GetFileLink(\n IssueBuilder\n .NewIssue(\"Issue for creating file link\", this)\n .InFile(filePath, line)\n .Create()\n );\n\n var htmlMessage =\n $\"This is an issues in the file <a href=\\\"{fileLink}\\\">{filePath}</a>\";\n\n var issue =\n IssueBuilder\n .NewIssue(\"MyMessage\", this)\n .WithMessageInHtmlFormat(htmlMessage)\n .InFile(filePath, line)\n .Create();\n\n return result;\n}\n
"},{"location":"documentation/extending/issue-provider/overview/","title":"Overview","text":"Issue providers need to implement the IIssueProvider interface.
"},{"location":"documentation/extending/issue-provider/overview/#base-classes","title":"Base classes","text":"For simplifying implementation there exists base classes from which concrete implementation can be inherited.
Base Class Use case Tutorial BaseIssueProvider Base class for a simple issue provider implementation. Simple provider BaseConfigurableIssueProvider Base class for a issue provider with issue provider specific settings. Provider settings BaseMultiFormatIssueProvider Base class for issue providers supporting multiple log formats. Multiple log file formats support"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/","title":"Multiple log file formats","text":"A single issue provider might support reading issues from multiple different log file formats. For these cases the Cake.Issue
addin provides the BaseMultiFormatIssueProvider, BaseMultiFormatIssueProviderSettings and BaseLogFileFormat classes for simplifying implementation in the issue provider addin.
A concrete class inheriting from BaseMultiFormatIssueProvider needs to be implemented defining the concrete types.
/// <summary>\n/// My issue provider.\n/// </summary>\npublic class MyIssuesProvider : BaseMultiFormatIssueProvider<MyIssuesSettings, MyIssuesProvider>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesProvider\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log context.</param>\n /// <param name=\"settings\">Settings for reading the log file.</param>\n public MyIssuesProvider(ICakeLog log, MyIssuesSettings settings)\n : base(log, settings)\n {\n }\n\n /// <inheritdoc />\n public override string ProviderName => \"MyIssuesProvider\";\n}\n
Also a concrete class inheriting from BaseMultiFormatIssueProviderSettings needs to be implemented defining the concrete types. Based on the capabilities of the log file formats the appropriate constructors for reading from the file system or memory can be made public:
/// <summary>\n/// Settings for my issue provider.\n/// </summary>\npublic class MyIssuesSettings : BaseMultiFormatIssueProviderSettings<MyIssuesProvider, MyIssuesSettings>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for reading a log file on disk.\n /// </summary>\n /// <param name=\"logFilePath\">Path to the log file.\n /// The log file needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n /// <param name=\"format\">Format of the provided log file.</param>\n public MyIssuesSettings(FilePath logFilePath, MyLogFileFormat format)\n : base(logFilePath, format)\n {\n }\n\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for a log file content in memory.\n /// </summary>\n /// <param name=\"logFileContent\">Content of the log file.\n /// The log file needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n /// <param name=\"format\">Format of the provided log file.</param>\n public MyIssuesSettings(byte[] logFileContent, MyLogFileFormat format)\n : base(logFileContent, format)\n {\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/#implementing-log-file-format-infrastructure","title":"Implementing log file format infrastructure","text":"An abstract class inheriting from BaseLogFileFormat needs to be implemented defining the concrete types for the issue provider:
/// <summary>\n/// Base class for all log file formats supported by my issue provider.\n/// </summary>\npublic abstract class MyLogFileFormat : BaseLogFileFormat<MyIssuesProvider, MyIssuesSettings>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyLogFileFormat\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log instance.</param>\n protected MyLogFileFormat(ICakeLog log)\n : base(log)\n {\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/#implementing-log-file-format","title":"Implementing log file format","text":"The different log file formats of an issue provider need to be inherited from the abstract log file format class:
/// <summary>\n/// Concrete log format.\n/// </summary>\ninternal class MyConcreteLogFileFormat : MyLogFileFormat\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyConcreteLogFileFormat\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log instance.</param>\n public MyConcreteLogFileFormat(ICakeLog log)\n : base(log)\n {\n }\n\n /// <inheritdoc/>\n public override IEnumerable<IIssue> ReadIssues(\n MyIssuesProvider issueProvider,\n RepositorySettings repositorySettings,\n MyIssuesSettings issueProviderSettings)\n {\n issueProvider.NotNull(nameof(issueProvider));\n repositorySettings.NotNull(nameof(repositorySettings));\n issueProviderSettings.NotNull(nameof(issueProviderSettings));\n\n var result = new List<IIssue>();\n\n // Implement log file format logic here.\n result.Add(\n IssueBuilder\n .NewIssue(\"Some message\", issueProvider)\n .WithPriority(IssuePriority.Warning)\n .OfRule(\"My rule\")\n .Create());\n\n return result;\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/logfile-format/#aliases","title":"Aliases","text":"For each concrete log file format a Cake property alias should be provided:
/// <summary>\n/// Gets an instance of the concrete log format.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Instance of the concrete log format.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static MyLogFileFormat MyConcreteLogFileFormat(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return new MyConcreteLogFileFormat(context.Log);\n}\n
Additionally an alias for reading issues with a specific format should be provided:
/// <summary>\n/// Gets an instance of a provider for issues using specified settings\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"settings\">Settings for reading the log.</param>\n/// <returns>Instance of a provider for issues.</returns>\n/// <example>\n/// <para>Read issues using my concrete log file format:</para>\n/// <code>\n/// <![CDATA[\n/// var settings =\n/// new MyIssuesSettings(\n/// @\"c:\\build\\issues.xml\",\n/// MyConcreteLogFileFormat);\n///\n/// var issues =\n/// ReadIssues(\n/// MyIssues(settings),\n/// @\"c:\\repo\");\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssues(\n this ICakeContext context,\n MyIssuesSettings settings)\n{\n context.NotNull(nameof(context));\n settings.NotNull(nameof(settings));\n\n return new MyIssuesProvider(context.Log, settings);\n}\n
For convenience of the user and based on the capabilities of the issue provider additional aliases for reading from the file system or from memory can be added:
/// <summary>\n/// Gets an instance of my issues provider for reading a log file from disk.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFilePath\">Path to the log file.\n/// The log file needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n/// <param name=\"format\">Format of the provided log file.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromFilePath(\n/// @\"c:\\build\\issues.log\",\n/// MyConcreteLogFileFormat));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromFilePath(\n this ICakeContext context,\n FilePath logFilePath,\n MyLogFileFormat format)\n{\n context.NotNull(nameof(context));\n logFilePath.NotNull(nameof(logFilePath));\n format.NotNull(nameof(format));\n\n return context.MyIssues(new MyIssuesSettings(logFilePath, format));\n}\n\n/// <summary>\n/// Gets an instance of my issues provider for reading a log file from memory.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFileContent\">Content of the log file.\n/// The log content needs to be in the format as defined by the <paramref name=\"format\"/> parameter.</param>\n/// <param name=\"format\">Format of the provided log content.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromContent(\n/// logFileContent,\n/// MyConcreteLogFileFormat));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromContent(\n this ICakeContext context,\n string logFileContent,\n MyLogFileFormat format)\n{\n context.NotNull(nameof(context));\n logFileContent.NotNullOrWhiteSpace(nameof(logFileContent));\n format.NotNull(nameof(format));\n\n return context.MyIssues(new MyIssuesSettings(logFileContent.ToByteArray(), format));\n}\n
Finally an additional property alias for returning the provider type name should be defined:
/// <summary>\n/// Gets the name of my issue provider.\n/// This name can be used to identify issues based on the <see cref=\"IIssue.ProviderType\"/> property.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Name of my issue provider.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static string MyIssuesProviderTypeName(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return typeof(MyIssuesProvider).FullName;\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/rule-url-resolving/","title":"Rule URL resolving","text":"For cases where additional logic is required to determine the URL for a rule, the Cake.Issue
addin provides the BaseRuleDescription and BaseRuleUrlResolver classes for simplifying implementation of providing URLs linking to site providing information about issues.
In the issue provider a concrete class inheriting from BaseRuleDescription should be implemented containing all properties required to determine the URL to a rule. The following class adds two properties Category
and RuleId
to the description:
/// <summary>\n/// Class describing rules for my issue provider.\n/// </summary>\npublic class MyRuleDescription : BaseRuleDescription\n{\n /// <summary>\n /// Gets or sets the category of the rule.\n /// </summary>\n public string Category { get; set; }\n\n /// <summary>\n /// Gets or sets the identifier of the rule.\n /// </summary>\n public int RuleId { get; set; }\n}\n
Also a class inheriting from BaseRuleUrlResolver needs to be implemented containing an implementation of TryGetRuleDescription for parsing rule urls to the concrete BaseRuleDescription class.
/// <summary>\n/// Class for retrieving an URL linking to a site describing a rule.\n/// </summary>\ninternal class MyRuleUrlResolver : BaseUrlResolver<MyRuleDescription>\n{\n /// <inheritdoc/>\n protected override bool TryGetRuleDescription(string rule, MyRuleDescription ruleDescription)\n {\n ruleDescription.RuleId = rule.Substring(3, rule.Length - 3);\n ruleDescription.Category = rule.Substring(0, 3);\n\n return true;\n }\n }\n
To use the URL resolver the ResolveRuleUrl method needs to be called:
var resolver = new MyRuleUrlResolver();\nvar url = resolver.ResolveRuleUrl(rule)\n
Afterwards different resolvers can be registered which return the actual URL based on the rule description:
/// <summary>\n/// Class for retrieving an URL linking to a site describing a rule.\n/// </summary>\ninternal class MyRuleUrlResolver : BaseUrlResolver<MyRuleDescription>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyRuleUrlResolver\"/> class.\n /// </summary>\n private MyRuleUrlResolver()\n {\n // Add resolver for different issue categories.\n this.AddUrlResolver(x =>\n x.Category.ToUpperInvariant() == \"FOO\" ?\n new Uri(\"https://www.google.com/search?q=%22\" + x.Rule) :\n null);\n this.AddUrlResolver(x =>\n x.Category.ToUpperInvariant() == \"BAR\" ?\n new Uri(\"https://www.bing.com/search?q=%22\" + x.Rule) :\n null);\n }\n }\n
"},{"location":"documentation/extending/issue-provider/tutorials/rule-url-resolving/#support-custom-url-resolvers","title":"Support custom URL resolvers","text":"The AddUrlResolver method can also be called from an Cake alias to allow users of the addin to register custom resolvers. For this the URL resolver class needs to be implemented as a singleton:
/// <summary>\n/// Class for retrieving an URL linking to a site describing a rule.\n/// </summary>\ninternal class MyRuleUrlResolver : BaseUrlResolver<MyRuleDescription>\n{\n private static readonly Lazy<MyRuleUrlResolver> InstanceValue =\n new Lazy<MyRuleUrlResolver>(() => new MyRuleUrlResolver());\n\n /// <summary>\n /// Gets the instance of the rule resolver.\n /// </summary>\n public static MyRuleUrlResolver Instance => InstanceValue.Value;\n}\n\n[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyIssueProviderAliases\n{\n /// <summary>\n /// Registers a new URL resolver with default priority of 0.\n /// </summary>\n /// <param name=\"context\">The context.</param>\n /// <param name=\"resolver\">Resolver which returns an <see cref=\"Uri\"/> linking to a site\n /// containing help for a specific <see cref=\"MyRuleDescription\"/>.</param>\n [CakeMethodAlias]\n [CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\n public static void MyIssueProviderAddRuleUrlResolver(\n this ICakeContext context,\n Func<MyRuleDescription, Uri> resolver)\n {\n context.NotNull(nameof(context));\n resolver.NotNull(nameof(resolver));\n\n MyRuleUrlResolver.Instance.AddUrlResolver(resolver);\n }\n
"},{"location":"documentation/extending/issue-provider/tutorials/settings/","title":"Provider settings","text":"Often issue providers require specific settings. For these cases the Cake.Issue
addin provides the BaseConfigurableIssueProvider and IssueProviderSettings classes for simplifying implementation in the issue provider addin.
A concrete class inheriting from BaseConfigurableIssueProvider needs to be implemented defining the concrete settings class to use:
/// <summary>\n/// My issue provider.\n/// </summary>\npublic class MyIssuesProvider : BaseConfigurableIssueProvider<MyIssuesSettings>\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesProvider\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log context.</param>\n /// <param name=\"settings\">Settings for reading the log file.</param>\n public MyIssuesProvider(ICakeLog log, MyIssuesSettings settings)\n : base(log, settings)\n {\n }\n\n /// <inheritdoc />\n public override string ProviderName => \"MyIssuesProvider\";\n\n /// <inheritdoc />\n protected override IEnumerable<IIssue> InternalReadIssues()\n {\n var result = new List<IIssue>();\n\n // Implement issue provider logic here.\n result.Add(\n IssueBuilder\n .NewIssue(\"Some message\", issueProvider)\n .WithPriority(IssuePriority.Warning)\n .OfRule(\"My rule\")\n .Create());\n\n return result;\n }\n}\n
Also a concrete class inheriting from IssueProviderSettings needs to be implemented. Based on the capabilities of the issue provider the appropriate constructors for reading from the file system or memory can be made public:
/// <summary>\n/// Settings for my issue provider.\n/// </summary>\npublic class MyIssuesSettings : IssueProviderSettings\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for reading a log file on disk.\n /// </summary>\n /// <param name=\"logFilePath\">Path to the log file.</param>\n public MyIssuesSettings(FilePath logFilePath)\n : base(logFilePath)\n {\n }\n\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesSettings\"/> class\n /// for a log file content in memory.\n /// </summary>\n /// <param name=\"logFileContent\">Content of the log file.</param>\n public MyIssuesSettings(byte[] logFileContent)\n : base(logFileContent)\n {\n }\n\n // Add additional settings for the issue provider here.\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/settings/#aliases","title":"Aliases","text":"An alias for reading issues with the provider should be provided:
/// <summary>\n/// Gets an instance of my issues provider using specified settings.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"settings\">Settings for reading the log.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var settings =\n/// new MyIssuesSettings(@\"c:\\build\\issues.log\");\n///\n/// var issues =\n/// ReadIssues(\n/// MyIssues(settings));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssues(\n this ICakeContext context,\n MyIssuesSettings settings)\n{\n context.NotNull(nameof(context));\n settings.NotNull(nameof(settings));\n\n return new MyIssuesProvider(context.Log, settings);\n}\n
For convenience of the user and based on the capabilities of the issue provider additional aliases for reading from the file system or from memory can be added:
/// <summary>\n/// Gets an instance of my issues provider for reading a log file from disk.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFilePath\">Path to the log file.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromFilePath(@\"c:\\build\\issues.log\"));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromFilePath(\n this ICakeContext context,\n FilePath logFilePath)\n{\n context.NotNull(nameof(context));\n logFilePath.NotNull(nameof(logFilePath));\n\n return context.MyIssues(new MyIssuesSettings(logFilePath));\n}\n\n/// <summary>\n/// Gets an instance of my issues provider for reading a log file from memory.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <param name=\"logFileContent\">Content of the log file.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssuesFromContent(logFileContent));\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssuesFromContent(\n this ICakeContext context,\n string logFileContent)\n{\n context.NotNull(nameof(context));\n logFileContent.NotNullOrWhiteSpace(nameof(logFileContent));\n\n return context.MyIssues(new MyIssuesSettings(logFileContent.ToByteArray()));\n}\n
Finally an additional property alias for returning the provider type name should be defined:
/// <summary>\n/// Gets the name of my issue provider.\n/// This name can be used to identify issues based on the <see cref=\"IIssue.ProviderType\"/> property.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Name of my issue provider.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static string MyIssuesProviderTypeName(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return typeof(MyIssuesProvider).FullName;\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/simple/","title":"Simple issue provider","text":"This tutorial explains how to implement a simple issue provider using the BaseIssueProvider class from the Cake.Issue
addin.
A concrete class inheriting from BaseIssueProvider needs to be implemented:
/// <summary>\n/// My issue provider.\n/// </summary>\npublic class MyIssuesProvider : BaseIssueProvider\n{\n /// <summary>\n /// Initializes a new instance of the <see cref=\"MyIssuesProvider\"/> class.\n /// </summary>\n /// <param name=\"log\">The Cake log context.</param>\n public MyIssuesProvider(ICakeLog log)\n : base(log, settings)\n {\n }\n\n /// <inheritdoc />\n public override string ProviderName => \"MyIssuesProvider\";\n\n /// <inheritdoc />\n protected override IEnumerable<IIssue> InternalReadIssues()\n {\n var result = new List<IIssue>();\n\n // Implement issue provider logic here.\n result.Add(\n IssueBuilder\n .NewIssue(\"Some message\", issueProvider)\n .WithPriority(IssuePriority.Warning)\n .OfRule(\"My rule\")\n .Create());\n\n return result;\n }\n}\n
"},{"location":"documentation/extending/issue-provider/tutorials/simple/#aliases","title":"Aliases","text":"An alias for reading issues with the provider should be provided:
/// <summary>\n/// Gets an instance of my issues provider using specified settings.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Instance of my issues provider.</returns>\n/// <example>\n/// <para>Read issues using my issues provider:</para>\n/// <code>\n/// <![CDATA[\n/// var issues =\n/// ReadIssues(\n/// MyIssues());\n/// ]]>\n/// </code>\n/// </example>\n[CakeMethodAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static IIssueProvider MyIssues(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return new MyIssuesProvider(context.Log);\n}\n
Additionally a property alias for returning the provider type name should be defined:
/// <summary>\n/// Gets the name of my issue provider.\n/// This name can be used to identify issues based on the <see cref=\"IIssue.ProviderType\"/> property.\n/// </summary>\n/// <param name=\"context\">The context.</param>\n/// <returns>Name of my issue provider.</returns>\n[CakePropertyAlias]\n[CakeAliasCategory(IssuesAliasConstants.IssueProviderCakeAliasCategory)]\npublic static string MyIssuesProviderTypeName(\n this ICakeContext context)\n{\n context.NotNull(nameof(context));\n\n return typeof(MyIssuesProvider).FullName;\n}\n
"},{"location":"documentation/extending/pull-request-system/categories/","title":"Alias categories","text":"Pull request system aliases should use the IssuesAliasConstants.MainCakeAliasCategory and PullRequestsAliasConstants.PullRequestSystemCakeAliasCategory constants for defining their category:
[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyPullRequestSystemAliases\n{\n [CakeMethodAlias]\n [CakeAliasCategory(PullRequestsAliasConstants.PullRequestSystemCakeAliasCategory)]\n public static IPullRequestSystem MyPullRequestSystem(\n this ICakeContext context)\n {\n }\n}\n
"},{"location":"documentation/extending/pull-request-system/overview/","title":"Overview","text":"Pull Request Systems need to implement the IPullRequestSystem interface.
"},{"location":"documentation/extending/pull-request-system/overview/#baseclasses","title":"BaseClasses","text":"For simplifying implementation there exists base classes from which concrete implementation can be inherited. BasePullRequestSystem is the main base class with the required functionality for a pull request system implementation. Additionally there exists several classes which can be implemented to support additional optional capabilities in a pull request system implementation.
Base Class Use case Tutorial BasePullRequestSystem Base class for all pull request system implementations. BaseCheckingCommitIdCapability Base class for capability to post issues only if pull request is for a specific commit. BaseDiscussionThreadsCapability Base class for capability to read, resolve and reopen discussion threads. BaseFilteringByModifiedFilesCapability Base class for capability to filter issues to only those affecting files modified in the pull request."},{"location":"documentation/extending/report-format/categories/","title":"Alias categories","text":"Report format aliases should use the IssuesAliasConstants.MainCakeAliasCategory and ReportingAliasConstants.ReportingFormatCakeAliasCategory constants for defining their category:
[CakeAliasCategory(IssuesAliasConstants.MainCakeAliasCategory)]\npublic static class MyReportFormatAliases\n{\n [CakeMethodAlias]\n [CakeAliasCategory(ReportingAliasConstants.ReportingFormatCakeAliasCategory)]\n public static IIssueReportFormat MyReportFormat(\n this ICakeContext context)\n {\n }\n}\n
"},{"location":"documentation/extending/report-format/overview/","title":"Overview","text":"Report formats need to implement the IIssueReportFormat interface. For simplifying implementation there exists an abstract IssueReportFormat base class from which concrete implementation can be inherited.
"},{"location":"documentation/issue-providers/","title":"Issue Providers","text":"Issue provider addins are responsible for providing the output of an analyzer or linter to the Cake Issues addin.
Tip
See How to implement issue providers for instruction on how to implement support for additional issue providers.
"},{"location":"documentation/issue-providers/docfx/","title":"DocFx","text":"Support for reading warnings reported by DocFx is implemented in the Cake.Issues.DocFx addin.
To call DocFx from a Cake script the Cake.DocFx addin can be used. To read issues from DocFx log files the DocFx issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.DocFx&version=1.0.0\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.DocFx&version=5.0.1\n
Note
In addition to the DocFx issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.DocFx\" Version=\"1.0.0\" />\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.DocFx\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example contains a task which will build the DocFx project and write a log file and a task to read issues from the log file and write the number of warnings to the console:
Cake .NET ToolCake Frosting build.cakevar logPath = @\"c:\\build\\docfx.log\";\nvar repoRootFolder = MakeAbsolute(Directory(\"./\"));\nvar docRootPath = @\"docs\";\n\nTask(\"Build-Documentation\").Does(() =>\n{\n // Run DocFx.\n DocFxBuild(new DocFxBuildSettings()\n {\n LogPath = logPath\n });\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Build-Documentation\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n DocFxIssuesFromFilePath(logPath, docRootPath),\n repoRootPath); \n\n Information(\"{0} issues are found.\", issues.Count());\n });\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Core.IO;\nusing Cake.Core;\nusing Cake.DocFx;\nusing Cake.DocFx.Build;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\docfx.log\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n public string DocRootPath { get; } = \"docs\";\n}\n\n[TaskName(\"Build-Documentation\")]\npublic sealed class BuildDocumentationTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Run DocFx.\n context.DocFxBuild(new DocFxBuildSettings()\n {\n LogPath = context.LogPath\n });\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(BuildDocumentationTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.DocFxIssuesFromFilePath(\n context.LogPath,\n context.DocRootPath),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/issue-providers/docfx/features/","title":"Features","text":"The Cake.Issues.DocFx addin provides the following features.
Tip: Running DocFxDocFx can be run with Cake.DocFx addin.
"},{"location":"documentation/issue-providers/docfx/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Support for reading issues reported by ESLint is implemented in the Cake.Issues.EsLint addin.
The Cake.Issues.EsLint addin provides the following features.
Tip: Running ESLintESLint can be run with Cake.ESLint addin.
"},{"location":"documentation/issue-providers/eslint/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
(4)IIssue.MessageText
Support for analyzing Git repositories is implemented in the Cake.Issues.GitRepository addin.
To analyze Git repositories you need to import the Git repository issue provider:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.GitRepository&version=5.0.1\n
Note
In addition to the Git repository issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.GitRepository\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example prints the number of binary files which are not tracked by Git Large File Storage in a repository.
Warning
Checking binary files requires Git and Git Large File Storage available on the local machine.
Cake .NET ToolCake Frosting build.cakeTask(\"Analyze-Repo\")\n.Does(() =>\n{\n // Read issues.\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n var settings =\n new GitRepositoryIssuesSettings\n {\n CheckBinaryFilesTrackedByLfs = true\n }; \n\n var issues =\n ReadIssues(\n GitRepositoryIssues(settings),\n repoRootPath); \n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Analyze-Repo\")]\npublic sealed class AnalyzeRepoTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n // Read issues.\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n var settings =\n new GitRepositoryIssuesSettings\n {\n CheckBinaryFilesTrackedByLfs = true\n }; \n\n var issues =\n context.ReadIssues(\n context.GitRepositoryIssues(settings),\n repoRootPath); \n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/issue-providers/gitrepository/features/","title":"Features","text":"The Cake.Issues.GitRepository addin provides the following features.
"},{"location":"documentation/issue-providers/gitrepository/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
A binary file in the repository is not tracked by Git Large File Storage.
"},{"location":"documentation/issue-providers/gitrepository/rules/BinaryFileNotTrackedByLfs/#rule-description","title":"Rule description","text":"By its nature Git repositories cannot handle binary files well and will keep a full copy of that file in the repository every time a change to that file is committed. Considering that you always clone the full history of a repository, and not only the latest version, using binary files in a repository considerably slow downs the operation. Git Large File Storage replaces large files with small text pointers inside the Git repository, while storing the file contents on a remote server.
Info
The rule assumes that all files, which are not text files are binary files. This also includes for example empty files.
"},{"location":"documentation/issue-providers/gitrepository/rules/BinaryFileNotTrackedByLfs/#how-to-fix-violations","title":"How to fix violations","text":"Track the file with Git Large File Storage.
"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/","title":"FilePathTooLong","text":"Metadata Rule Id FilePathTooLong Priority Warning Available in 0.7.3 or higher"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/#cause","title":"Cause","text":"The path of a file in the repository is too long.
"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/#rule-description","title":"Rule description","text":"Some operating systems and applications have a limitation of maximum path length which they can handle. To guarantee proper building this length should not be exceeded.
"},{"location":"documentation/issue-providers/gitrepository/rules/FilePathTooLong/#how-to-fix-violations","title":"How to fix violations","text":"Rename the name of the file or shorten the path name.
"},{"location":"documentation/issue-providers/inspectcode/","title":"InspectCode","text":"Support for reading issues reported by JetBrains Inspect Code is implemented in the Cake.Issues.InspectCode addin.
To read issues from InspectCode log files the InspectCode issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n
Note
In addition to the InspectCode issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example contains a task which will run JetBrains InspectCode and write a log file and a task to read issues from the log file and write the number of warnings to the console. JetBrains InspectCode is installed using JetBrains.ReSharper.CommandLineTools
:
#tool \"nuget:?package=JetBrains.ReSharper.CommandLineTools&version=1.0.0\"\n\nvar logPath = @\"c:\\build\\inspectcode.xml\";\nvar repoRootFolder = MakeAbsolute(Directory(\"./\"));\n\nTask(\"Analyze-Project\").Does(() =>\n{\n // Run InspectCode.\n var settings = new InspectCodeSettings() {\n OutputFile = logPath\n };\n\n InspectCode(repoRootPath.CombineWithFilePath(\"MySolution.sln\"), settings);\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Analyze-Project\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n InspectCodeIssuesFromFilePath(logPath),\n repoRootPath);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Core.IO;\nusing Cake.Core;\nusing Cake.Frosting;\nusing Cake.Common.Tools.InspectCode;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .InstallTool(\n new Uri(\n \"nuget:?package=JetBrains.ReSharper.CommandLineTools&version=1.0.0\"))\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\inspectcode.xml\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n}\n\n[TaskName(\"Analyze-Project\")]\npublic sealed class AnalyzeProjectTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Run InspectCode.\n var settings = new InspectCodeSettings() {\n OutputFile = context.LogPath\n };\n\n context.InspectCode(\n context.RepoRootPath.CombineWithFilePath(\"MySolution.sln\"),\n settings);\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(AnalyzeProjectTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.InspectCodeIssuesFromFilePath(context.LogPath),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/issue-providers/inspectcode/features/","title":"Features","text":"The Cake.Issues.InspectCode addin provides the following features.
Tip: Running InspectCodeJetBrains InsepectCode can be run using the InspectCode alias.
"},{"location":"documentation/issue-providers/inspectcode/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Support for reading issues reported by markdownlint is implemented in the Cake.Issues.Markdownlint addin.
To call markdownlint-cli from a Cake script the Cake.Markdownlint addin can be used. To read issues from markdownlint-cli log files the markdownlint issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Markdownlint&version=1.0.0\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.Markdownlint&version=5.0.1\n
Note
In addition to the markdownlint issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Markdownlint\" Version=\"1.0.0\" />\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Markdownlint\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example contains a task which will run markdownlint-cli and write a log file and a task to read issues from the log file and write the number of warnings to the console:
Cake .NET ToolCake Frosting build.cakevar logPath = @\"c:\\build\\markdownlint.log\";\nvar repoRootFolder = MakeAbsolute(Directory(\"./\"));\n\nTask(\"Lint-Documentation\").Does(() =>\n{\n // Run markdownlint-cli.\n var settings =\n MarkdownlintNodeJsRunnerSettings.ForDirectory(\n context.RepoRootPath.Combine(\"docs\"));\n settings.OutputFile = logPath;\n settings.ThrowOnIssue = false;\n RunMarkdownlintNodeJs(settings);\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Lint-Documentation\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n MarkdownlintIssuesFromFilePath(\n logPath,\n MarkdownlintCliLogFileFormat),\n repoRootPath);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Common.IO;\nusing Cake.Core;\nusing Cake.Core.IO;\nusing Cake.Frosting;\nusing Cake.Markdownlint;\nusing Cake.Markdownlint.NodeJs;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\markdownlint.log\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n}\n\n[TaskName(\"Lint-Documentation\")]\npublic sealed class LintDocumentationTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Run markdownlint-cli.\n var settings =\n MarkdownlintNodeJsRunnerSettings.ForDirectory(\n context.RepoRootPath.Combine(\"docs\"));\n settings.OutputFile = context.LogPath;\n settings.ThrowOnIssue = false;\n context.RunMarkdownlintNodeJs(settings);\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(LintDocumentationTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.MarkdownlintIssuesFromFilePath(\n context.LogPath,\n context.MarkdownlintCliLogFileFormat()),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/issue-providers/markdownlint/features/","title":"Features","text":"The Cake.Issues.Markdownlint addin provides the following features.
Tip: Running markdownlintmarkdownlint-cli can be run with the Cake.Markdownlint addin.
"},{"location":"documentation/issue-providers/markdownlint/features/#basic-features","title":"Basic features","text":"options.resultVersion
set to 1.--json
parameter.IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
(3)IIssue.EndColumn
IIssue.FileLink
(4)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
(5)IIssue.PriorityName
(6)IIssue.Rule
IIssue.RuleUrl
(7)IIssue.MessageText
Warning
Support for reading warnings reported by MsBuild is implemented in the Cake.Issues.MsBuild.
To read issues from MsBuild log files you need to import the MsBuild issue provider needs to be imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n
Note
In addition to the MsBuild issue provider the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example contains a task which will call MsBuild to build the solution and write a binary log file and a task to read issues from the binary log file and write the number of warnings to the console:
Cake .NET ToolCake Frosting build.cakevar logPath = @\"c:\\build\\msbuild.xml\";\nvar repoRootPath = MakeAbsolute(Directory(\"./\"));\n\nTask(\"Build-Solution\").Does(() =>\n{\n // Build solution.\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n logPath.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n});\n\nTask(\"Read-Issues\")\n .IsDependentOn(\"Build-Solution\")\n .Does(() =>\n {\n // Read issues.\n var issues =\n ReadIssues(\n MsBuildIssuesFromFilePath(\n logPath,\n MsBuildBinaryLogFileFormat),\n repoRootPath);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Core;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n public FilePath LogPath { get; } = @\"c:\\build\\msbuild.xml\";\n public DirectoryPath RepoRootPath { get; } =\n context.MakeAbsolute(context.Directory(\"./\"));\n}\n\n[TaskName(\"Build-Solution\")]\npublic sealed class BuildSolutionTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Build solution.\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n context.LogPath.FullPath);\n context.DotNetBuild(\n context.RepoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n }\n}\n\n[TaskName(\"Read-Issues\")]\n[IsDependentOn(typeof(BuildSolutionTask))]\npublic sealed class ReadIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n // Read issues.\n var issues =\n context.ReadIssues(\n context.MsBuildIssuesFromFilePath(\n context.LogPath,\n context.MsBuildBinaryLogFileFormat()),\n context.RepoRootPath);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
Tip
When using MSBuildSettings.BinaryLogger
property to write a binary log, the version of the binary log format written depends on the version of the .NET SDK.
To avoid the risk of breaking builds when the .NET SDK is updated and introduces a new binary log format, which is not supported in the used version of Cake.Issues.MsBuild, the binary logger instance shipped as part of Cake.Issues.MsBuild is used in the above example.
"},{"location":"documentation/issue-providers/msbuild/features/","title":"Features","text":"The Cake.Issues.MsBuild addin provides the following features.
Tip: Running MSBuildMSBuild can be run using the DotNet aliases or MsBuild aliases.
"},{"location":"documentation/issue-providers/msbuild/features/#basic-features","title":"Basic features","text":"CA*
) and StyleCop (SA*
) warnings.IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
(3)IIssue.EndColumn
IIssue.FileLink
(4)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
(5)IIssue.MessageText
CA*
) and StyleCop (SA*
) warnings. Support for additional rules can be added through a custom MsBuildAddRuleUrlResolverSupport for reading issues in SARIF format is implemented in the Cake.Issues.Sarif addin.
The Cake.Issues.Sarif addin provides the following features.
"},{"location":"documentation/issue-providers/sarif/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Support for reading issues reported by Terraform validate command is implemented in the Cake.Issues.Terraform addin.
The Cake.Issues.Terraform addin provides the following features.
Tip: Running TerraformTerraform can be run with Cake.Terraform addin.
"},{"location":"documentation/issue-providers/terraform/features/#basic-features","title":"Basic features","text":"IIssue.ProviderType
IIssue.ProviderName
IIssue.Run
(1)IIssue.Identifier
(2)IIssue.ProjectName
IIssue.ProjectFileRelativePath
IIssue.AffectedFileRelativePath
IIssue.Line
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
IIssue.FileLink
(3)IIssue.MessageText
IIssue.MessageHtml
IIssue.MessageMarkdown
IIssue.Priority
IIssue.PriorityName
IIssue.Rule
IIssue.RuleUrl
IIssue.MessageText
Pull request addins implement specific Pull Request Systems and allow the Cake Issues addin to write found issues as comments to pull requests.
Tip
See How to implement pull request systems for instruction on how to implement support for additional pull request systems.
"},{"location":"documentation/pull-request-systems/appveyor/","title":"AppVeyor","text":"Support for AppVeyor is implemented in the Cake.Issues.PullRequests.AppVeyor addin.
The Cake.Issues.PullRequests.AppVeyor addin reports issues as messages to AppVeyor builds.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/appveyor/features/#basic-features","title":"Basic features","text":"The Cake.Issues.PullRequests.AppVeyor addin doesn't support any additional capabilities.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/appveyor/examples/github-pullrequest-integration/","title":"GitHub pull request integration","text":"This example shows how to write AppVeyor messages created by Cake.Issues to GitHub pull requests.
Issues reported as messages to AppVeyor builds can be written to a GitHub pull request using GitHub Pull Request Notification in your appveyor.yml
file.
The following example will write a comment to the GitHub pull request containing all issues which were posted as message to the AppVeyor build:
notifications:\n- provider: GitHubPullRequest\n template: \"{{#passed}}:white_check_mark:{{/passed}}{{#failed}}:x:{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})<p>Build messages:</p><ul>{{#jobs}}{{#messages}}<li>{{message}}<br/>{{details}}</li>{{/messages}}{{/jobs}}</ul>\"\n
The output will look similar to this:
"},{"location":"documentation/pull-request-systems/appveyor/examples/write-messages/","title":"Writing message to AppVeyor","text":"To report issues as messages to an AppVeyor build, the AppVeyor addin needs to be imported. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AppVeyor&version=5.0.1\n
Note
In addition to the AppVeyor pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AppVeyor\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
This example shows how to report issues as messages to an AppVeyor build using the AppVeyorBuilds alias:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToAppVeyor\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AppVeyorBuilds(),\n repoRootPath);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToAppVeyor\")]\npublic sealed class ReportIssuesToAppVeyorTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AppVeyorBuilds(),\n repoRootPath);\n }\n}\n
The output will look similar to this:
"},{"location":"documentation/pull-request-systems/azure-devops/","title":"Azure DevOps","text":"Support for Azure DevOps is implemented in the Cake.Issues.PullRequests.AzureDevOps addin.
The Cake.Issues.PullRequests.AzureDevOps addin provides the following features.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/azure-devops/features/#basic-features","title":"Basic features","text":"The Cake.Issues.PullRequests.AzureDevOps addin supports the following capabilities.
For detailed instructions how to connect using the different methods see Setup instructions.
"},{"location":"documentation/pull-request-systems/azure-devops/setup/","title":"Setup","text":"This page describes the different ways how the Cake.Issues.PullRequests.AzureDevOps addin can be setup.
"},{"location":"documentation/pull-request-systems/azure-devops/setup/#ntlm-authentication","title":"NTLM authentication","text":"Info
NTLM authentication is only available for on-premise Azure DevOps Server.
To authenticate with NTLM you can use the AzureDevOpsAuthenticationNtlm alias from the Cake.AzureDevOps addin.
The user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
Basic authentication is only available for on-premise Azure DevOps Server.
To authenticate with basic authentication you can use the AzureDevOpsAuthenticationBasic alias from the Cake.AzureDevOps addin and need to Configure Azure DevOps Server to use Basic Authentication.
The user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
To authenticate with an personal access token you can use the AzureDevOpsAuthenticationPersonalAccessToken alias from the Cake.AzureDevOps addin.
If you want to use the Cake.Issues.PullRequests.AzureDevOps addin with an personal access token see Authenticate access with personal access tokens for Azure DevOps for instructions how to create a personal access token.
The access token needs to have the scope Code (read and write)
set and the user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
OAuth authentication is only available for Azure DevOps Service.
If you want to use the Cake.Issues.PullRequests.AzureDevOps addin from an Azure Pipelines you can authenticate using the OAuth token provided to the build. For this you need to enable the Allow scripts to access the OAuth token option on the build definition.
To authenticate you can use the AzureDevOpsAuthenticationOAuth alias from the Cake.AzureDevOps addin.
The user under which the build runs, named <projectName> Build Service (<organizationName>)
(e.g. Cake.Issues-Demo Build Service (cake-contrib)
), needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
Entra authentication is only available for Azure DevOps Service.
To authenticate with Entra ID you can use the AzureDevOpsAuthenticationAzureActiveDirectory alias from the Cake.AzureDevOps addin.
The user needs to have Contribute to pull requests
permission for the specific repository to allow Cake.Issues.PullRequests.AzureDevOps addin to post issues as comments to pull requests.
Info
There's a demo repository available which you can fork and to which you can create pull requests to test the integration functionality.
"},{"location":"documentation/pull-request-systems/azure-devops/examples/azure-pipelines/","title":"Using with Azure Pipelines","text":"To write issues as comments to Azure DevOps pull requests, the Azure DevOps addin needs to be imported. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n#addin nuget:?package=Cake.AzureDevOps&version=1.0.0\n
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins and the Cake.AzureDevOps addin need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example shows a task which will call the AzureDevOpsPullRequests alias to connect to the pull request using the environment variables provided by Azure Pipelines.:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToPullRequest\").Does(() =>\n{\n var repoRootFolder =\n MakeAbsolute(Directory(\"./\"));\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AzureDevOpsPullRequests(),\n repoRootPath);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath =\n context.MakeAbsolute(context.Directory(\"./\"));\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AzureDevOpsPullRequests(),\n repoRootPath);\n }\n}\n
Info
Please note that you'll need to setup your Azure Pipelines build to Allow scripts to access the OAuth token and need to setup proper permissions.
See OAuth authentication from Azure Pipelines for details.
"},{"location":"documentation/pull-request-systems/azure-devops/examples/pullrequest-id/","title":"Using with pull request id","text":"To write issues as comments to Azure DevOps pull requests, the Azure DevOps addin needs to be imported. To determine the remote repository URL the Cake.Git addin can be used. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Git&version=1.0.0\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n#addin nuget:?package=Cake.AzureDevOps&version=1.0.0\n
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins and the Cake.AzureDevOps addin need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Git\" Version=\"{{ cake_git }}\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example shows a task which will first determine the remote repository URL and with this information call the AzureDevOpsPullRequests alias, which will authenticate through NTLM to an on-premise Azure DevOps Server instance:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToPullRequest\").Does(() =>\n{\n var repoRootPath =\n MakeAbsolute(Directory(\"./\"));\n var currentBranch =\n GitBranchCurrent(repoRootPath);\n var repoRemoteUrl =\n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var pullRequestId = 123;\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AzureDevOpsPullRequests(\n repoRemoteUrl,\n pullRequestId,\n AzureDevOpsAuthenticationNtlm()),\n repoRootPath);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\nusing Cake.Git;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath =\n context.MakeAbsolute(context.Directory(\"./\"));\n var currentBranch =\n context.GitBranchCurrent(repoRootPath);\n var repoRemoteUrl = \n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var pullRequestId = 123;\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AzureDevOpsPullRequests(\n repoRemoteUrl,\n pullRequestId,\n context.AzureDevOpsAuthenticationNtlm()),\n repoRootPath);\n }\n}\n
"},{"location":"documentation/pull-request-systems/azure-devops/examples/repository-information/","title":"Using with repository remote url and source branch name","text":"To write issues as comments to Azure DevOps pull requests, the Azure DevOps addin needs to be imported. To determine the remote repository URL and source branch of the pull request the Cake.Git addin can be used. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Git&version=1.0.0\n#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n#addin nuget:?package=Cake.AzureDevOps&version=1.0.0\n
Note
In addition to the Azure DevOps pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins and the Cake.AzureDevOps addin need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Git\" Version=\"1.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example shows a task which will first determine the remote repository URL and source branch of the pull request and with this information call the AzureDevOpsPullRequests alias, which will authenticate through NTLM to an on-premise Azure DevOps Server instance:
Cake .NET ToolCake Frosting build.cakeTask(\"Report-IssuesToPullRequest\").Does(() =>\n{\n var repoRootFolder =\n MakeAbsolute(Directory(\"./\"));\n var currentBranch =\n GitBranchCurrent(repoRootFolder);\n var repoRemoteUrl =\n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var sourceBranchName = currentBranch.CanonicalName;\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n AzureDevOpsPullRequests(\n repoRemoteUrl,\n sourceBranchName,\n AzureDevOpsAuthenticationNtlm()),\n repoRootFolder);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\nusing Cake.Git;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath =\n context.MakeAbsolute(context.Directory(\"./\"));\n var currentBranch =\n context.GitBranchCurrent(repoRootPath);\n var repoRemoteUrl = \n new Uri(currentBranch.Remotes.Single(x => x.Name == \"origin\").Url);\n var sourceBranchName = currentBranch.CanonicalName;\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.AzureDevOpsPullRequests(\n repoRemoteUrl,\n sourceBranchName,\n context.AzureDevOpsAuthenticationNtlm()),\n repoRootPath);\n }\n}\n
"},{"location":"documentation/pull-request-systems/github-actions/","title":"GitHub Actions","text":"Support for GitHub Actions is implemented in the Cake.Issues.PullRequests.GitHubActions addin.
The Cake.Issues.PullRequests.GitHubActions addin creates annotations from issues when running on GitHub actions.
"},{"location":"documentation/pull-request-systems/github-actions/features/#basic-features","title":"Basic features","text":"The Cake.Issues.PullRequests.GitHubActions addin doesn't support any additional capabilities.
To report issues as annotations to a GitHub Actions build, the GitHub Actions addin needs to be imported. For this example the JetBrains InspectCode issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.GitHubActions&version=5.0.1\n
Note
In addition to the GitHub Actions pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.GitHubActions\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
This example shows how to report issues as annotations to GitHubActions build using the GitHubActionsBuilds alias:
Cake .NET ToolCake Frosting build.cakeTask(\"ReportIssuesToGitHubActions\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n ReportIssuesToPullRequest(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n GitHubActionsBuilds(),\n repoRootFolder);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Report-IssuesToAppVeyor\")]\npublic sealed class ReportIssuesToAppVeyorTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n context.ReportIssuesToPullRequest(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n context.GitHubActionsBuilds(),\n repoRootPath);\n }\n}\n
The output will show up in the build log grouped by issue provider / run:
Additionally the issues show up as annotations:
Having issues available as annotations also means that they will be shown in pull requests on the related file / position:
"},{"location":"documentation/recipe/","title":"Overview","text":"Cake.Issues recipes provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
Integration of code analyzing and linting tools into a build pipeline often looks the similar, and differentiates mainly on the used linters, build and pull request systems. Cake.Issues recipes contain code to do all the parsing, integration with build and pull request systems for you, using the individual Cake.Issues addins. They support different linters based on the linting log files you pass it and integrate automatically with different build and pull request systems.
There are two flavors available:
Cake.Issues.Recipe
For Cake .NET Tool
Cake.Frosting.Issues.Recipe
For Cake Frosting
See supported tools for a list of supported linters, build servers and pull request systems.
"},{"location":"documentation/recipe/#bundled-addins","title":"Bundled addins","text":"Cake.Issues recipes will add the following addins to your build:
Cake.Issues.RecipeCake.Frosting.Issues.Recipe Addin Version Remarks Cake.Git 5.0.1 Only used ifRepositoryInfoProvider
type is set to RepositoryInfoProviderType.CakeGit
. See Git repository information configuration for details. Cake.Issues 5.0.1 Cake.Issues.MsBuild 5.0.1 Cake.Issues.InspectCode 5.0.1 Cake.Issues.Markdownlint 5.0.1 Cake.Issues.EsLint 5.0.1 Cake.Issues.Sarif 5.0.1 Cake.Issues.Reporting 5.0.1 Cake.Issues.Reporting.Generic 5.0.1 Cake.Issues.Reporting.Sarif 5.0.1 Cake.Issues.PullRequests 5.0.1 Cake.Issues.PullRequests.AppVeyor 5.0.1 Cake.Issues.PullRequests.AzureDevOps 5.0.1 Cake.Issues.PullRequests.GitHubActions 5.0.1 Cake.AzureDevOps 5.0.0 Addin Version Remarks Cake.Frosting.Git 5.0.1 Only used if RepositoryInfoProvider
type is set to RepositoryInfoProviderType.CakeGit
. See Git repository information configuration for details. Cake.Issues 5.0.1 Cake.Frosting.Issues.MsBuild 5.0.1 Cake.Frosting.Issues.InspectCode 5.0.1 Cake.Frosting.Issues.Markdownlint 5.0.1 Cake.Frosting.Issues.EsLint 5.0.1 Cake.Frosting.Issues.Sarif 5.0.1 Cake.Frosting.Issues.Reporting 5.0.1 Cake.Frosting.Issues.Reporting.Generic 5.0.1 Cake.Frosting.Issues.Reporting.Sarif 5.0.1 Cake.Frosting.Issues.PullRequests 5.0.1 Cake.Frosting.Issues.PullRequests.AppVeyor 5.0.1 Cake.Frosting.Issues.PullRequests.AzureDevOps 5.0.1 Cake.Frosting.Issues.PullRequests.GitHubActions 5.0.1 Cake.AzureDevOps 5.0.0"},{"location":"documentation/recipe/configuration/","title":"Configuration","text":"This page lists configuration properties which can be used to define the functionality and behavior of Cake.Issues recipes.
"},{"location":"documentation/recipe/configuration/#git-repository-information","title":"Git repository information","text":"Cake.Issues recipes require some information about current Git repository.
To define the Git provider in Cake.Issues.Recipe
set the global variable RepositoryInfoProvider
. To define the Git provider in Cake.Frosting.Issues.Recipe
pass the value to the constructor of IssueContext
.
The following providers are supported:
Provider DescriptionRepositoryInfoProviderType.CakeGit
Read repository information using Cake.Git addin. Requires system to be compatible with Cake.Git addin. RepositoryInfoProviderType.Cli
Read repository information using Git CLI. Requires Git CLI to be available in path. By default Cake.Git addin will be used.
"},{"location":"documentation/recipe/configuration/#general","title":"General","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters Property Default Value DescriptionOutputDirectory
BuildArtifacts
Path to the output directory. A relative path will be relative to the current working directory. BuildIdentifier
string.Empty
Identifier for the build run. If set this identifier will be used to identify to artifacts provided by the build if building on multiple configurations. IssuesContext.Parameters Property Default Value Description OutputDirectory
BuildArtifacts
Path to the output directory. A relative path will be relative to the current working directory. BuildIdentifier
string.Empty
Identifier for the build run. If set this identifier will be used to identify to artifacts provided by the build if building on multiple configurations."},{"location":"documentation/recipe/configuration/#input-files","title":"Input files","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.InputFiles Methods Description AddMsBuildXmlFileLoggerLogFilePath()
Adds a path to a MSBuild log file created by XmlFileLogger. AddMsBuildXmlFileLoggerLogFileContent()
Adds content of a MSBuild log file created by XmlFileLogger. AddMsBuildBinaryLogFilePath()
Adds a path to a MSBuild binary log file. AddMsBuildBinaryLogFileContent()
Adds content of a MSBuild binary log file. AddInspectCodeLogFilePath()
Adds a path to a JetBrains InspectCode log file. AddInspectCodeLogFileContent()
Adds content of a JetBrains InspectCode log file. AddMarkdownlintCliLogFilePath()
Adds a path to a markdownlint-cli log file. AddMarkdownlintCliLogFileContent()
Adds content of a markdownlint-cli log file. AddMarkdownlintCliJsonLogFilePath()
Adds a path to a markdownlint-cli log file writting with --json
. AddMarkdownlintCliJsonLogFileContent()
Adds content of a markdownlint-cli log file writting with --json
. AddMarkdownlintV1LogFilePath()
Adds a path to a markdownlint log file in version 1. AddMarkdownlintV1LogFileContent()
Adds content of a markdownlint log file in version 1. AddEsLintJsonLogFilePath()
Adds a path to a ESLint log file generated by the ESLint json formatter. AddEsLintJsonLogFileContent()
Adds content of a ESLint log file generated by the ESLint json formatter. AddSarifLogFilePath()
Adds a path to a SARIF log file. AddSarifLogFileContent()
Adds content of a SARIF log file. IssuesContext.Parameters.InputFiles Methods Description AddMsBuildXmlFileLoggerLogFilePath()
Adds a path to a MSBuild log file created by XmlFileLogger. AddMsBuildXmlFileLoggerLogFileContent()
Adds content of a MSBuild log file created by XmlFileLogger. AddMsBuildBinaryLogFilePath()
Adds a path to a MSBuild binary log file. AddMsBuildBinaryLogFileContent()
Adds content of a MSBuild binary log file. AddInspectCodeLogFilePath()
Adds a path to a JetBrains InspectCode log file. AddInspectCodeLogFileContent()
Adds content of a JetBrains InspectCode log file. AddMarkdownlintCliLogFilePath()
Adds a path to a markdownlint-cli log file. AddMarkdownlintCliLogFileContent()
Adds content of a markdownlint-cli log file. AddMarkdownlintCliJsonLogFilePath()
Adds a path to a markdownlint-cli log file writting with --json
. AddMarkdownlintCliJsonLogFileContent()
Adds content of a markdownlint-cli log file writting with --json
. AddMarkdownlintV1LogFilePath()
Adds a path to a markdownlint log file in version 1. AddMarkdownlintV1LogFileContent()
Adds content of a markdownlint log file in version 1. AddEsLintJsonLogFilePath()
Adds a path to a ESLint log file generated by the ESLint json formatter. AddEsLintJsonLogFileContent()
Adds content of a ESLint log file generated by the ESLint json formatter. AddSarifLogFilePath()
Adds a path to a SARIF log file. AddSarifLogFileContent()
Adds content of a SARIF log file."},{"location":"documentation/recipe/configuration/#report-creation","title":"Report creation","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.Reporting Property Default Value Description ShouldCreateFullIssuesReport
true
Indicates whether full issues report should be created. FullIssuesReportSettings
GenericIssueReportTemplate.HtmlDxDataGrid
template with DevExtremeTheme.MaterialBlueLight
theme. Settings for creating the full issues report. See Template Gallery for possible options. ShouldCreateSarifReport
true
Indicates whether a report in SARIF format should be created. ShouldReportIssuesToConsole
false
Indicates whether issues should be reported to the console. ReportToConsoleSettings
Settings for reporting issues to the console. IssuesContext.Parameters.Reporting Property Default Value Description ShouldCreateFullIssuesReport
true
Indicates whether full issues report should be created. FullIssuesReportSettings
GenericIssueReportTemplate.HtmlDxDataGrid
template with DevExtremeTheme.MaterialBlueLight
theme. Settings for creating the full issues report. See Template Gallery for possible options. ShouldCreateSarifReport
true
Indicates whether a report in SARIF format should be created. ShouldReportIssuesToConsole
false
Indicates whether issues should be reported to the console. ReportToConsoleSettings
Settings for reporting issues to the console."},{"location":"documentation/recipe/configuration/#build-server-integration","title":"Build server integration","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.BuildServer Property Default Value Description ShouldReportIssuesToBuildServer
true
Indicates whether issues should be reported to the build server. ShouldPublishFullIssuesReport
true
Indicates whether full issues report should be published as artifact to the build system. ShouldPublishSarifReport
true
Indicates whether report int SARIF format shoudl be published as artifact to the build system. ShouldCreateSummaryIssuesReport
true
Indicates whether summary issues report should be created. IssuesContext.Parameters.BuildServer Property Default Value Description ShouldReportIssuesToBuildServer
true
Indicates whether issues should be reported to the build server. ShouldPublishFullIssuesReport
true
Indicates whether full issues report should be published as artifact to the build system. ShouldPublishSarifReport
true
Indicates whether report int SARIF format shoudl be published as artifact to the build system. ShouldCreateSummaryIssuesReport
true
Indicates whether summary issues report should be created."},{"location":"documentation/recipe/configuration/#pull-request-integration","title":"Pull request integration","text":"Cake.Issues.RecipeCake.Frosting.Issues.Recipe IssuesParameters.PullRequestSystem Property Default Value Description ShouldReportIssuesToPullRequest
true
Indicates whether issues should be reported to the pull request system. MaxIssuesToPost
null
Global number of issues which should be posted at maximum over all issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a global limit. MaxIssuesToPostAcrossRuns
null
Global number of issues which should be posted at maximum over all issue providers and across multiple runs. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a limit across multiple runs. MaxIssuesToPostForEachIssueProvider
100
Number of issues which should be posted at maximum for each issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't limit issues per issue provider. ProviderIssueLimits
Empty Issue limits for individual issue provider. The key must be the IIssue.ProviderType
of a specific provider to which the limits should be applied to. IssueFilters
Empty List of filter functions which should be applied before posting issues to pull requests. ShouldSetPullRequestStatus
true
Indicates whether a status on the pull request should be set if there are any issues found. ShouldSetSeparatePullRequestStatusForEachIssueProviderAndRun
true
Indicates whether a separate status should be set for issues of every issue provider and run. IssuesContext.Parameters.PullRequestSystem Property Default Value Description ShouldReportIssuesToPullRequest
true
Indicates whether issues should be reported to the pull request system. MaxIssuesToPost
null
Global number of issues which should be posted at maximum over all issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a global limit. MaxIssuesToPostAcrossRuns
null
Global number of issues which should be posted at maximum over all issue providers and across multiple runs. Issues are filtered by priority and issues with a file path are prioritized. null
won't set a limit across multiple runs. MaxIssuesToPostForEachIssueProvider
100
Number of issues which should be posted at maximum for each issue provider. Issues are filtered by priority and issues with a file path are prioritized. null
won't limit issues per issue provider. ProviderIssueLimits
Empty Issue limits for individual issue provider. The key must be the IIssue.ProviderType
of a specific provider to which the limits should be applied to. IssueFilters
Empty List of filter functions which should be applied before posting issues to pull requests. ShouldSetPullRequestStatus
true
Indicates whether a status on the pull request should be set if there are any issues found. ShouldSetSeparatePullRequestStatusForEachIssueProviderAndRun
true
Indicates whether a separate status should be set for issues of every issue provider and run."},{"location":"documentation/recipe/demos/","title":"Demos","text":"There are demo setups available for different combinations of build servers and repositories which you can fork and to which you can create pull requests to test the recipe functionality.
Recipe Build Server Repository Cake.Issues.Recipe Azure Pipelines Azure Repos"},{"location":"documentation/recipe/supported-tools/","title":"Supported tools","text":"Cake.Issues recipes support reading issues from different tools and integrates with different build and pull request systems.
"},{"location":"documentation/recipe/supported-tools/#tools","title":"Tools","text":"Cake.Issues recipes support reading issues from output of the following tools:
Cake.Issues.RecipeCake.Frosting.Issues.Recipe Tool Format IssuesParameters.InputFiles Method MsBuild MSBuild Extension Pack XmlFileLoggerAddMsBuildXmlFileLoggerLogFile*()
MsBuild Binary Log File AddMsBuildBinaryLogFile*()
JetBrains InspectCode (ReSharper) xml AddInspectCodeLogFile*()
markdownlint markdownlint-cli default format AddMarkdownlintCliLogFile*()
markdownlint markdownlint-cli with --json
AddMarkdownlintCliJsonLogFile*()
markdownlint markdownlint version 1 AddMarkdownlintV1LogFile*()
ESLint json formatter AddEsLintJsonLogFile*()
Any SARIF compatible tool SARIF AddSarifLogFile*()
Tool Format IssuesContext.Parameters.InputFiles Method MsBuild MSBuild Extension Pack XmlFileLogger AddMsBuildXmlFileLoggerLogFile*()
MsBuild Binary Log File AddMsBuildBinaryLogFile*()
JetBrains InspectCode (ReSharper) xml AddInspectCodeLogFile*()
markdownlint markdownlint-cli default format AddMarkdownlintCliLogFile*()
markdownlint markdownlint-cli with --json
AddMarkdownlintCliJsonLogFile*()
markdownlint markdownlint version 1 AddMarkdownlintV1LogFile*()
ESLint json formatter AddEsLintJsonLogFile*()
Any SARIF compatible tool SARIF AddSarifLogFile*()
Tip
See Supported tools for a list of tools supporting the SARIF format.
"},{"location":"documentation/recipe/supported-tools/#build-systems","title":"Build systems","text":"Cake.Issues recipes integrates with the following build systems:
AppVeyorAzure PipelinesGitHub ActionsCake.Issues recipes integrates with the following pull request systems:
Azure ReposGitHubCake.Issues recipes provide the following tasks to your build script:
Cake.Issues.RecipeCake.Frosting.Issues.Recipe Task Description IssuesBuildTasks propertyIssues
Main tasks for issue management integration. IssuesTask
Read-Issues
Reads issues from the provided log files. ReadIssuesTask
Create-FullIssuesReport
Creates issue report. CreateFullIssuesReportTask
Publish-IssuesArtifacts
Publish artifacts to build server. PublishIssuesArtifactsTask
Report-IssuesToBuildServer
Report issues to build server. ReportIssuesToBuildServerTask
Create-SummaryIssuesReport
Creates a summary issue report. CreateSummaryIssuesReportTask
Report-IssuesToPullRequest
Report issues to pull request. ReportIssuesToPullRequestTask
Set-PullRequestIssuesState
Set pull request status. SetPullRequestIssuesStateTask
Report-IssuesToConsole
Report issues to console. ReportIssuesToConsoleTask
Task Description Task type Issues
Main tasks for issue management integration. Cake.Frosting.Issues.Recipe.
IssuesTask
Read-Issues
Reads issues from the provided log files. Cake.Frosting.Issues.Recipe.
ReadIssuesTask
Create-FullIssuesReport
Creates issue report. Cake.Frosting.Issues.Recipe.
CreateFullIssuesReportTask
Publish-IssuesArtifacts
Publish artifacts to build server. Cake.Frosting.Issues.Recipe.
PublishIssuesArtifactsTask
Report-IssuesToBuildServer
Report issues to build server. Cake.Frosting.Issues.Recipe.
ReportIssuesToBuildServerTask
Create-SummaryIssuesReport
Creates a summary issue report. Cake.Frosting.Issues.Recipe.
CreateSummaryIssuesReportTask
Report-IssuesToPullRequest
Report issues to pull request. Cake.Frosting.Issues.Recipe.
ReportIssuesToPullRequestTask
Set-PullRequestIssuesState
Set pull request status. Cake.Frosting.Issues.Recipe.
SetPullRequestIssuesStateTask
Report-IssuesToConsole
Report issues to console. Cake.Frosting.Issues.Recipe.
ReportIssuesToConsoleTask
"},{"location":"documentation/report-formats/","title":"Report Formats","text":"Report format addins implement specific report formats and allow the Cake Issues addin to create reports in the specific format.
Tip
See How to implement report format for instruction on how to implement support for additional report formats.
"},{"location":"documentation/report-formats/console/","title":"Console","text":"Support for printing issues to the console is implemented in the a Cake.Issues.Reporting.Console addin.
To report issues to the console the Console report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Console&version=5.0.1\n
Note
In addition to the Console report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Console\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will print issues logged as warnings by MsBuild to the console.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat),\n ConsoleIssueReportFormat(\n new ConsoleIssueReportFormatSettings\n {\n GroupByRule = true,\n ShowProviderSummary = true,\n ShowPrioritySummary = true\n }),\n repoRootPath,\n string.Empty);\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.ConsoleIssueReportFormat(\n new ConsoleIssueReportFormatSettings\n {\n GroupByRule = true,\n ShowProviderSummary = true,\n ShowPrioritySummary = true\n }),\n repoRootPath,\n string.Empty);\n }\n}\n
"},{"location":"documentation/report-formats/console/features/","title":"Features","text":"The Cake.Issues.Reporting.Console addin provides the following features:
Reports:
Support for creating reports in any text based format like HTML or Markdown is implemented in the Cake.Issues.Reporting.Generic addin.
The Cake.Issues.Reporting.Generic addin provides the following features:
Info
See Template Gallery for a list of available out of the box and 3rd party templates.
"},{"location":"documentation/report-formats/generic/examples/","title":"Examples","text":"Info
If you create a universally usable custom template we're happy to package it with the addin. To have it included in the addin please create a pull request with your contribution.
To create custom HTML reports the Generic report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.1\n
Note
In addition to the Generic report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Generic\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will create a HTML report for issues logged as warnings by MsBuild using a custom template.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"c:\\repo\");\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new MSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile)\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\"),\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create HTML report using Diagnostic template.\n CreateIssueReport(\n new List<IIssueProvider>\n {\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat)\n },\n GenericIssueReportFormatFromFilePath(@\"c:\\ReportTemplate.cshtml\"),\n repoRootFolder,\n @\"c:\\report.html\");\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.GenericIssueReportFormatFromFilePath(@\"c:\\ReportTemplate.cshtml\"),\n repoRootPath,\n @\"c:\\report.html\");\n }\n}\n
The template looks like this:
ReportTemplate.cshtml@model IEnumerable<Cake.Issues.IIssue>\n\n<!DOCTYPE html>\n\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <meta charset=\"utf-8\" />\n <title></title>\n</head>\n<body>\n <table>\n <thead>\n <tr>\n <th scope=\"col\">AffectedFileRelativePath</th>\n <th scope=\"col\">Line</th>\n <th scope=\"col\">Message</th>\n <th scope=\"col\">Priority</th>\n <th scope=\"col\">Rule</th>\n <th scope=\"col\">RuleUrl</th>\n <th scope=\"col\">ProviderType</th>\n </tr>\n </thead>\n <tbody>\n @foreach (var issue in Model)\n {\n <tr>\n <td>@issue.AffectedFileRelativePath</td>\n <td>@issue.Line</td>\n <td>@issue.MessageText</td>\n <td>@issue.Priority</td>\n <td>@issue.RuleId</td>\n <td>@issue.RuleUrl</td>\n <td>@issue.ProviderType</td>\n </tr>\n }\n </tbody>\n </table>\n</body>\n</html>\n
The template retrieves an IEnumerable<Cake.Issues.IIssue>
as model.
Info
In custom templates functionality from the following assemblies are available:
To create HTML reports the Generic report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.1\n
Note
In addition to the Generic report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Generic\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will create a HTML report for issues logged as warnings by MsBuild.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create HTML report using Diagnostic template.\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat),\n GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootPath,\n @\"c:\\report.html\");\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Write issues to console.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootPath,\n @\"c:\\report.html\");\n }\n}\n
"},{"location":"documentation/report-formats/generic/templates/","title":"Template Gallery","text":"Template for a HTML report containing a rich data table view with sorting and search functionality powered by Simple-DataTables.
"},{"location":"documentation/report-formats/generic/templates/htmldatatable/#features","title":"Features","text":"Severity
, Project
, Path
, File
, Location
, Rule
, Message
.To create a report using the HTML Data Table template you can use the GenericIssueReportTemplate.HtmlDataTable enum value:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDataTable),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDataTable),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
"},{"location":"documentation/report-formats/generic/templates/htmldatatable/#options","title":"Options","text":"This template doesn't support any options.
"},{"location":"documentation/report-formats/generic/templates/htmldatatable/#demos","title":"Demos","text":"Info
You can use the source code as a template for your custom template.
Source code is available on GitHub.
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/","title":"HTML Diagnostic","text":"Template for a HTML report containing a list of all issues with all properties.
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/#features","title":"Features","text":"To create a report using the HTML diagnostic template you can use the GenericIssueReportTemplate.HtmlDiagnostic enum value:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDiagnostic),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDiagnostic),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/#options","title":"Options","text":"This template doesn't support any options.
"},{"location":"documentation/report-formats/generic/templates/htmldiagnostic/#demos","title":"Demos","text":"Info
You can use the source code as a template for your custom template.
Source code is available on GitHub.
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/","title":"HTML DevExtreme Data Grid","text":"Template for a HTML report containing a rich data grid with sorting, filtering, grouping and search capabilities powered by DevExtreme.
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/#features","title":"Features","text":"Provider
, Severity
, Project
, Path
, File
, Location
, Rule
, Message
by default.To create a report using the HTML DevExtreme Data Grid template you can use the GenericIssueReportTemplate.HtmlDxDataGrid enum value:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/#options","title":"Options","text":"See HtmlDxDataGridOption for a list of possible options.
"},{"location":"documentation/report-formats/generic/templates/htmldxdatagrid/#demos","title":"Demos","text":"The following demo shows the template with its default options:
The template supports the teams defined in the DevExtremeTheme enumeration which can be set using the HtmlDxDataGridOption.Theme:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.Theme,\n DevExtremeTheme.MaterialBlueLight)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.Theme,\n DevExtremeTheme.MaterialBlueLight)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Visible columns can be defined using the ColumnNameVisible
option:
CreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.LineVisible,\n false)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.LineVisible,\n false)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Additional columns can be added using the HtmlDxDataGridOption.AdditionalColumns option.
Sorted columns can be defined using the HtmlDxDataGridOption.SortedColumns and the ColumnNameSortOder
options:
CreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.SortedColumns,\n new List<ReportColumn> { ReportColumn.RuleId })\n .WithOption(\n HtmlDxDataGridOption.RuleIdSortOrder,\n ColumnSortOrder.Descending )),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.SortedColumns,\n new List<ReportColumn> { ReportColumn.RuleId })\n .WithOption(\n HtmlDxDataGridOption.RuleIdSortOrder, \n ColumnSortOrder.Descending )),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Grouping can be defined using the HtmlDxDataGridOption.GroupedColumns option:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.GroupedColumns, \n new List<ReportColumn> { ReportColumn.RuleId })),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.GroupedColumns, \n new List<ReportColumn> { ReportColumn.RuleId })),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Exporting can be enabled using the HtmlDxDataGridOption.EnableExporting option:
Cake .NET ToolCake FrostingCreateIssueReport(\n issues,\n GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.EnableExporting,\n true)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
context.CreateIssueReport(\n issues,\n context.GenericIssueReportFormatFromEmbeddedTemplate(\n GenericIssueReportTemplate.HtmlDxDataGrid,\n settings => settings\n .WithOption(\n HtmlDxDataGridOption.EnableExporting,\n true)),\n @\"c:\\repo\",\n @\"c:\\report.html\");\n
Info
You can use the source code as a template for your custom template.
Source code is available on GitHub.
"},{"location":"documentation/report-formats/sarif/","title":"Sarif","text":"Support for creating SARIF compatible reports is implemented in the Cake.Issues.Reporting.Sarif addin.
To report issues to the console the SARIF report format needs to be imported. For this example the MsBuild issue provider is additionally used for reading issues:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Sarif&version=5.0.1\n
Note
In addition to the SARIF report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Sarif\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following example will create a SARIF report for issues logged as warnings by MsBuild.
Cake .NET ToolCake Frosting build.cakeTask(\"Create-IssueReport\").Does(() =>\n{\n var repoRootPath = MakeAbsolute(Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + Context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create SARIF report.\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n msBuildLogFile,\n MsBuildBinaryLogFileFormat,\n SarifIssueReportFormat(),\n repoRootPath,\n @\"c:\\report.sarif\");\n});\n
Program.csusing Cake.Common.IO;\nusing Cake.Common.Tools.DotNet;\nusing Cake.Common.Tools.DotNet.Build;\nusing Cake.Common.Tools.DotNet.MSBuild;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-IssueReport\")]\npublic sealed class CreateIssueReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootPath = context.MakeAbsolute(context.Directory(\"./\"));\n\n // Build MySolution.sln solution in the repository root folder and write a binary log.\n FilePath msBuildLogFile = @\"c:\\build\\msbuild.log\";\n var msBuildSettings =\n new DotNetMSBuildSettings().WithLogger(\n \"BinaryLogger,\" + context.Tools.Resolve(\"Cake.Issues.MsBuild*/**/StructuredLogger.dll\"),\n \"\",\n msBuildLogFile.FullPath);\n context.DotNetBuild(\n repoRootPath.CombineWithFilePath(\"MySolution.sln\").FullPath,\n new DotNetBuildSettings{MSBuildSettings = msBuildSettings});\n\n // Create SARIF report.\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n msBuildLogFile,\n context.MsBuildBinaryLogFileFormat()),\n context.SarifIssueReportFormat(),\n repoRootPath,\n @\"c:\\report.sarif\");\n }\n}\n
"},{"location":"documentation/report-formats/sarif/features/","title":"Features","text":"The Cake.Issues.Reporting.Sarif addin provides the following features:
Supports the following properties in the SARIF report:
Info
If you have written about Cake Issues we would like to hear from you. You can add it by creating a pull request here.
"},{"location":"documentation/resources/blog-posts/#2018","title":"2018","text":"Info
If you have done a presentation about Cake Issues we would like to hear from you. You can add it by creating a pull request here.
"},{"location":"documentation/resources/presentations/#2019","title":"2019","text":"The easiest way to use Cake Issues is by using one of the Recipe packages, which provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
"},{"location":"documentation/usage/#consuming-of-individual-addins","title":"Consuming Of Individual Addins","text":"The addins can be added individually to any Cake build and allow advanced customizations:
The Cake.Issues
addin can be used to break builds if specific issues were reported.
To break builds you need to import the following core addin:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n
Build.csproj<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Issues\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
The following task will fail the build if any issues were added to the issues
global variable:
// Global issues list into which issues need to be added.\nIEnumerable<IIssue> issues = null;\n\nTask(\"BreakBuildOnIssues\")\n .Description(\"Breaks build if any issues in the code are found.\")\n .Does(() =>\n{\n BreakBuildOnIssues(issues);\n});\n
Program.csusing Cake.Core;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .Run(args);\n }\n}\n\npublic class BuildContext(ICakeContext context) : FrostingContext(context)\n{\n private readonly List<IIssue> _issues = [];\n\n public IEnumerable<IIssue> Issues { get { return _issues; } }\n\n public void AddIssues(IEnumerable<IIssue> issues)\n {\n _issues.AddRange(issues);\n }\n}\n\n[TaskName(\"BreakBuildOnIssues\")]\npublic sealed class BreakBuildOnIssuesTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n context.BreakBuildOnIssues(context.Issues);\n }\n}\n
"},{"location":"documentation/usage/creating-issues/creating-issues/","title":"Creating issues","text":"The Cake.Issues
addin can be used to create issues directly in the build script. This issues can for example be used to create reports.
To create issues you need to import the following core addin:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n
Build.csproj<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Issues\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
In the following task a new warning for the myfile.txt file on line 42 is created:
Cake .NET ToolCake Frosting build.cakeTask(\"Create-Issue\").Does(() =>\n{\n var issue =\n NewIssue(\n \"Something went wrong\",\n \"MyCakeScript\",\n \"My Cake Script\")\n .WithMessageInHtmlFormat(\"Something went <b>wrong</b>\")\n .WithMessageInMarkdownFormat(\"Something went **wrong**\")\n .InFile(\"myfile.txt\", 42)\n .WithPriority(IssuePriority.Warning)\n .Create();\n\n Information(\"Issue created with message: {0}\", issue.MessageText);\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-Issue\")]\npublic sealed class CreateIssueTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var issue =\n context.NewIssue(\n \"Something went wrong\",\n \"MyCakeScript\",\n \"My Cake Script\")\n .WithMessageInHtmlFormat(\"Something went <b>wrong</b>\")\n .WithMessageInMarkdownFormat(\"Something went **wrong**\")\n .InFile(\"myfile.txt\", 42)\n .WithPriority(IssuePriority.Warning)\n .Create();\n\n context.Information(\"Issue created with message: {0}\", issue.MessageText);\n }\n}\n
"},{"location":"documentation/usage/creating-reports/","title":"Creating Reports","text":"Tip
For more report format specific examples see Report Format Examples.
"},{"location":"documentation/usage/creating-reports/creating-reports/","title":"Creating reports","text":"To create report for issues you need to import the corresponding report format. In the following example the issue provider for reading warnings from MsBuild log files and generic report format is imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.1\n
Note
In addition to the report format the Cake.Issues
and Cake.Issues.Reporting
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.Reporting.Generic\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Afterwards you can define a task where you call the reporting addin with the desired issue provider and report format:
Cake .NET ToolCake Frosting build.cakeTask(\"Create-Report\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n CreateIssueReport(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat),\n GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootFolder,\n @\"c:\\report.html\");\n});\n
Program.csusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Create-Report\")]\npublic sealed class CreateReportTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n context.CreateIssueReport(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n context.GenericIssueReportFormatFromEmbeddedTemplate(GenericIssueReportTemplate.HtmlDiagnostic),\n repoRootFolder,\n @\"c:\\report.html\");\n }\n}\n
"},{"location":"documentation/usage/reading-issues/","title":"Reading Issues","text":"Tip
For more issue provider specific examples see Issue Provider Examples.
"},{"location":"documentation/usage/reading-issues/file-linking/","title":"File linking","text":"File link settings can be defined while reading issues and are passed through the IIssue.FileLink
property to reporting formats, pull request systems and build server implementations:
var settings =\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n FileLinkSettings =\n IssueFileLinkSettingsForGitHubCommit(\n \"https://github.com/cake-contrib/Cake.Issues\",\n \"76a7cacef7ad4295a6766646d45c9b56\")\n }; \n\n var issues =\n ReadIssues(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n settings));\n
var settings =\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n FileLinkSettings =\n IssueFileLinkSettingsForGitHubCommit(\n \"https://github.com/cake-contrib/Cake.Issues\",\n \"76a7cacef7ad4295a6766646d45c9b56\")\n }; \n\n var issues =\n context.ReadIssues(\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n settings));\n
Cake.Issues comes with out-of-the-box support for linking to files hosted on GitHub and Azure Repos, either for a specific branch or commit. Additionally there are aliases which can be used to define any custom pattern.
"},{"location":"documentation/usage/reading-issues/reading-issues/","title":"Reading issues","text":"The Cake.Issues
addin can be used to aggregate issues from different sources. This can for example be useful to break builds based on the reported issues.
To read issues you need to import at least one issue provider. In the following example the issue providers for reading warnings from MsBuild log files and from JetBrains InspectCode are imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1\n
Note
In addition to the issue providers the Cake.Issues
core addin needs to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.InspectCode\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Afterwards you can define a task where you call the core addin with the desired issue providers. The following example reads warnings and errors reported by MsBuild from a binary log and issues reported by JetBrains InspectCode:
Cake .NET ToolCake Frosting build.cakeTask(\"Read-Issues\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n var issues = ReadIssues(\n new List<IIssueProvider>\n {\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat),\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\")\n },\n repoRootFolder);\n\n Information(\"{0} issues are found.\", issues.Count());\n});\n
Program.csusing Cake.Common.Diagnostics;\nusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"Read-Issues\")]\npublic sealed class ReadIssuesTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n var issues = context.ReadIssues(\n new List<IIssueProvider>\n {\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n context.InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\")\n },\n repoRootFolder);\n\n context.Information(\"{0} issues are found.\", issues.Count());\n }\n}\n
"},{"location":"documentation/usage/reading-issues/run-information/","title":"Additional run information","text":"If a build script needs to parse multiple log files from the same tool, e.g. because multiple MsBuild solutions were built, this can be done by calling the issue provider multiple times. If the results are read into the same list and shown on the same report, individual issues could not be assigned to any of the calls, since issue provider type and name are identical.
Starting with Cake.Issues 0.9.0 it is possible to pass additional run information while reading issues, which then will be stored with each issues in the IIssue.Run
property:
var issues = new List<IIssue>();\n\n// Parse issues from build of solution 1\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution1-msbuild.log\",\n MsBuildBinaryLogFileFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 1\"\n }\n )\n);\n\n// Parse issues from build of solution 2\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution2-msbuild.log\",\n MsBuildBinaryLogFileFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 2\"\n }\n )\n);\n
var issues = new List<IIssue>();\n\n// Parse issues from build of solution 1\nissues.AddRange(\n context.ReadIssues(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution1-msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 1\"\n }\n )\n);\n\n// Parse issues from build of solution 2\nissues.AddRange(\n context.ReadIssues(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution2-msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 2\"\n }\n )\n);\n
"},{"location":"documentation/usage/recipe/","title":"Recipe usage","text":"Cake.Issues recipes provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.
Integration of code analyzing and linting tools into a build pipeline often looks the similar, and differentiates mainly on the used linters, build and pull request systems. Cake.Issues recipes contain code to do all the parsing, integration with build and pull request systems for you, using the individual Cake.Issues addins. They support different linters based on the linting log files you pass it and integrate automatically with different build and pull request systems.
There are two flavors available:
Cake.Issues.Recipe
For Cake .NET Tool
Cake.Frosting.Issues.Recipe
For Cake Frosting
The Cake.Frosting.Issues.Recipe package can be used to easily add issue management functionality to your Cake Frosting build.
Info
See Setting Up A New Frosting Project for instructions how to create a new Cake Frosting project.
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#add-cakefrostingissuesrecipe-to-your-cake-frosting-build","title":"Add Cake.Frosting.Issues.Recipe to your Cake Frosting build","text":"To use Cake.Frosting.Issues.Recipe in your Cake Frosting build you need to first add the NuGet package in your .csproj
file:
<PackageReference Include=\"Cake.Frosting.Issues.Recipe\" Version=\"5.0.1\" />\n
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#register-cakeissues-tasks","title":"Register Cake.Issues tasks","text":"To make Cake Issues tasks available to your Cake Frosting build you need to register them.
Add the following line to the bootstrapping code in the Main
method of your Cake Frosting project:
AddAssembly(Assembly.GetAssembly(typeof(IssuesTask)))\n
The following bootstrapping code registers the Cake Issues tasks and also installs JetBrains InspectCode:
using System;\nusing System.Reflection;\nusing Cake.Frosting;\nusing Cake.Frosting.Issues.Recipe;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .UseContext<BuildContext>()\n .InstallTool(\n new Uri(\n \"nuget:?package=JetBrains.ReSharper.CommandLineTools&version=1.0.0\"))\n .AddAssembly(Assembly.GetAssembly(typeof(IssuesTask)))\n .Run(args);\n }\n}\n
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#create-build-context","title":"Create build context","text":"Cake.Frosting.Issues.Recipe provides a build context from which you need to inherit your custom build context. The build context contains configuration parameters, but also the state of the current running build, like for example all collected issues.
The following example creates a build context and defines that Cake Issues should use Cake.Git addin to determine state of the Git repository:
public class BuildContext : IssuesContext\n{\n public BuildContext(ICakeContext context)\n : base(context, RepositoryInfoProviderType.CakeGit)\n {\n }\n}\n
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#passing-issues-to-cakefrostingissuesrecipe","title":"Passing issues to Cake.Frosting.Issues.Recipe","text":"To make issues available to Cake.Frosting.Issues.Recipe you need pass the log files through the corresponding methods. The tasks need to also be a dependency of ReadIssuesTask
provided by Cake.Frosting.Issues.Recipe.
In the following example a new task is introduced which runs JetBrains InspectCode and passes the log file to Cake.Frosting.Issues.Recipe:
[TaskName(\"Run-InspectCode\")]\n[IsDependeeOf(typeof(ReadIssuesTask))]\npublic class RunInspectCodeTask : FrostingTask<BuildContext>\n{\n public override void Run(BuildContext context)\n {\n var inspectCodeLogFilePath = context.Parameters.OutputDirectory..CombineWithFilePath(\"inspectCode.log\");\n\n // Run JetBrains InspectCode\n context.InspectCode(\n context.State.RepositoryRootDirectory.Combine(\"src\").CombineWithFilePath(\"ClassLibrary1.sln\"),\n new InspectCodeSettings() {\n OutputFile = context.InspectCodeLogFilePath\n });\n\n // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe\n context.Parameters.InputFiles.AddInspectCodeLogFilePath(context.InspectCodeLogFilePath);\n }\n}\n
See configuration for a full list of available configuration parameters.
"},{"location":"documentation/usage/recipe/using-cake-frosting-issues-recipe/#calling-issues-tasks","title":"Calling issues tasks","text":"Cake.Frosting.Issues.Recipe will add a bunch of tasks to your build script.
To add the issues functionality into your existing build pipeline you need to add ReadIssuesTask
to your pipeline.
In the following example the Default
task makes sure the main IssuesTask
is executed:
[TaskName(\"Default\")]\n[IsDependentOn(typeof(IssuesTask))]\npublic class DefaultTask : FrostingTask\n{\n}\n
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/","title":"Using Cake.Issues.Recipe","text":"The Cake.Issues.Recipe package can be used to easily add issue management functionality to your build script.
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/#add-cakeissuesrecipe-to-your-build-script","title":"Add Cake.Issues.Recipe to your build script","text":"To use Cake.Issues.Recipe in your build script you need to first load the NuGet package:
#load nuget:package=Cake.Issues.Recipe&version=5.0.1\n
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/#configuring-cakeissuesrecipe","title":"Configuring Cake.Issues.Recipe","text":"To make issues available to Cake.Issues.Recipe you need to set the corresponding configuration parameters.
In the following example a new task is introduced which depends on existing tasks which build a MsBuild solution and run JetBrains InspectCode. It will pass the MsBuild and InspectCode logfile to Cake.Issues.Recipe:
// Run issues task by default.\nTask(\"Configure-CakeIssuesRecipe\")\n .IsDependentOn(\"Build\")\n .IsDependentOn(\"Run-InspectCode\")\n .Does(() =>\n{\n IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(msBuildLogFilePath);\n IssuesParameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath);\n}\n
See configuration for a full list of available configuration parameters.
"},{"location":"documentation/usage/recipe/using-cake-issues-recipe/#calling-issues-tasks","title":"Calling issues tasks","text":"Cake.Issues.Recipe will add a bunch of tasks to your build script.
To add the issues functionality into your existing build pipeline you can make the Read-Issues
task dependent on the task which configures Cake.Issues.Recipe:
// Make sure build and linters run before issues task.\nIssuesBuildTasks.ReadIssuesTask\n .IsDependentOn(\"Configure-CakeIssuesRecipe\");\n
At some point you need to call the tasks provided by Cake.Isses.Recipe. In the following example the Default
task calls the main Issues
task:
// Run issues task by default.\nTask(\"Default\")\n .IsDependentOn(\"Issues\");\n
"},{"location":"documentation/usage/reporting-issues-to-pull-requests/","title":"Reporting Issues To Pull Requests","text":"Tip
For more pull request system specific examples see Pull Request System Examples
"},{"location":"documentation/usage/reporting-issues-to-pull-requests/custom-issue-filter/","title":"Custom issue filter","text":"You can define custom filters which are applied to issues before they are posted as comments to pull requests.
Tip: Filter to issues introduced with pull requestYou can use a custom filter to only have issues introduced with the current code posted to the pull request.
For this you need to store your log files as artifacts on your build system, then you can define a custom filter which retrieves the logs from the previous build, parses them using the appropriate issue provider and filters out any issues which were already existing in the previous build.
The following example will filter out all issues from the rule CA1000
from being posted to the pull request.
#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1 \n\nTask(\"ReportIssuesToPullRequest\").Does(() =>\n{\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\"); \n\n var settings = new ReportIssuesToPullRequestFromIssueProviderSettings(repoRootFolder); \n\n // Add custom filter.\n settings.IssueFilters.Add(x => x.Where(issue => issue.RuleId != \"CA1000\")); \n\n ReportIssuesToPullRequest(\n new List<IIssueProvider>\n {\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat)\n },\n AzureDevOpsPullRequests(),\n settings);\n});\n
Build.csproj<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Program.csusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"ReportIssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\"); \n\n var settings = new ReportIssuesToPullRequestFromIssueProviderSettings(repoRootFolder); \n\n // Add custom filter.\n settings.IssueFilters.Add(x => x.Where(issue => issue.RuleId != \"CA1000\")); \n\n context.ReportIssuesToPullRequest(\n new List<IIssueProvider>\n {\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat())\n },\n context.AzureDevOpsPullRequests(),\n settings);\n }\n}\n
"},{"location":"documentation/usage/reporting-issues-to-pull-requests/report-issues-to-pull-requests/","title":"Report issues to pull requests","text":"To use report issues to pull requests you need to import the corresponding pull request system addin. In the following example the issue provider for reading warnings from MsBuild log files and support for Azure DevOps pull requests is imported:
Cake .NET ToolCake Frosting build.cake#addin nuget:?package=Cake.Issues&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1\n#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1\n#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1\n
Note
In addition to the pull request system the Cake.Issues
and Cake.Issues.PullRequests
core addins need to be added.
<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>net9.0</TargetFramework>\n <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>\n <ImplicitUsings>enable</ImplicitUsings>\n </PropertyGroup>\n <ItemGroup>\n <PackageReference Include=\"Cake.Frosting\" Version=\"5.0.0\" />\n <PackageReference Include=\"Cake.Frosting.Issues.MsBuild\" Version=\"5.0.1\" />\n <PackageReference Include=\"Cake.Frosting.Issues.PullRequests.AzureDevOps\" Version=\"5.0.1\" />\n </ItemGroup>\n</Project>\n
Afterwards you can define a task where you call the core addin with the desired issue provider and pull request system:
Cake .NET ToolCake Frosting build.cake Task(\"ReportIssuesToPullRequest\").Does(() =>\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n ReportIssuesToPullRequest(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n MsBuildBinaryLogFileFormat),\n AzureDevOpsPullRequests(),\n repoRootFolder);\n });\n
Program.csusing Cake.Core.IO;\nusing Cake.Frosting;\n\npublic static class Program\n{\n public static int Main(string[] args)\n {\n return new CakeHost()\n .Run(args);\n }\n}\n\n[TaskName(\"ReportIssuesToPullRequest\")]\npublic sealed class ReportIssuesToPullRequestTask : FrostingTask<FrostingContext>\n{\n public override void Run(FrostingContext context)\n {\n var repoRootFolder = new DirectoryPath(@\"C:\\repo\");\n context.ReportIssuesToPullRequest(\n context.MsBuildIssuesFromFilePath(\n @\"C:\\build\\msbuild.log\",\n context.MsBuildBinaryLogFileFormat()),\n context.AzureDevOpsPullRequests(),\n repoRootFolder);\n }\n}\n
"},{"location":"news/","title":"News","text":""},{"location":"news/2020/08/22/cake-issues-v090-released/","title":"Cake Issues v0.9.0 Released","text":"Cake Issues version 0.9.0 has been released. This is a major release bringing a lot of new features across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
While in previous versions most parts of Cake Issues was already targeting .NET Standard and with this could be executed on .NET Framework, .NET Core and Mono, Cake.Issues.Reporting.Generic
could only run on .NET Framework and Mono, but not on .NET Core. With this release Cake.Issues.Reporting.Generic
was ported to also run on .NET Core.
The migration was done by gep13 on his Twitch stream and you can watch work done in Stream 90 - Working on Cake.Issues.Recipe, Stream 91 - Working on Cake.Issues.Reporting.Generic and Gazorator and Stream 92 - Working on Cake.Issues.Reporting.Generic and Gazorator - Part 2.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#enhanced-issue-information","title":"Enhanced issue information","text":"The description for issues has been extended by additional information for column and ranges:
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
Existing issue providers have been updated to provide the additional information where available. See feature description for individual issue providers for which information a specific issue provider supports.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#file-linking","title":"File linking","text":"In previous versions Cake.Issues.Reporting.Generic
supported entries linking to the file on the source code provider (GitHub, Azure Repos, ...). With this release file linking infrastructure has been moved to the Cake.Issues
addin and can be used by any addin.
File link settings can be defined while reading issues and are passed through the new IIssue.FileLink
property to reporting formats, pull request systems and build server implementations:
var settings =\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n FileLinkSettings =\n IssueFileLinkSettingsForGitHubCommit(\n \"https://github.com/cake-contrib/Cake.Issues.Reporting.Generic\",\n \"76a7cacef7ad4295a6766646d45c9b56\")\n };\n\n var issues =\n ReadIssues(\n InspectCodeIssuesFromFilePath(\n @\"C:\\build\\inspectcode.log\"),\n settings));\n
Cake.Issues
comes with out-of-the-box support for linking to files hosted on GitHub and Azure Repos, either for a specific branch or commit. Additionally there are aliases which can be used to define any custom pattern.
If a build script needed to parse multiple log files from the same tool, e.g. because multiple MsBuild solutions were built, this was currently possible by calling the issue provider multiple times. If the results were read into the same list and shown on the same report, individual issues could not be assigned to any of the calls, since issue provider type and name were identical. Starting with Cake.Issues 0.9.0 it is now possible to pass additional run information while reading issues, which then will be stored with each issues in the IIssue.Run
property:
var issues = new List<IIssue>();\n\n// Parse issues from build of solutions 1\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution1-msbuild.log\",\n MsBuildXmlFileLoggerFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 1\"\n }\n )\n);\n\n// Parse issues from build of solutions 2\nissues.AddRange(\n ReadIssues(\n MsBuildIssuesFromFilePath(\n @\"C:\\build\\solution2-msbuild.log\",\n MsBuildXmlFileLoggerFormat),\n new ReadIssuesSettings(@\"c:\\repo\")\n {\n Run = \"Solution 2\"\n }\n )\n);\n
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#improved-pull-request-integration","title":"Improved pull request integration","text":"In previous versions the text message of an issue was used to detect issues already reported in a previous run. This didn't work well for issues which contain information in the message which likely changes between runs, like e.g. line information. In this version a specific identifier, IIssue.Identifier
, is used which can be set by the issue provider.
When working with legacy code bases which contain a lot of existing issues, using something like Cake.Issues can be hard, since it will notify about every existing issue if something is changed in a file. To work around this issue it is possible to limit issues which will be posted to pull request systems. In previous versions it was already possible to limit the total number of issues, the number of issues for every issue provider and the total number of issues across multiple run. With 0.9.0 it will additionally be possible to limit the number of issues for specific issue providers for either a single or across multiple runs. This allows advanced scenarios like posting a maximum of 10 MsBuild issues every run, but not more than 20 in total across all runs.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#get-everything-together","title":"Get everything together","text":"Cake.Issues.Recipe, the Cake Recipe script which you can integrate into your build script for easy integration of full feature issue management, has been updated to version 0.4.0, bringing all the new features of Cake.Issues 0.9.0.
","boost":0.5},{"location":"news/2020/08/22/cake-issues-v090-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 0.9.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
MarkdownlintLogFileFormat
alias has been renamed to MarkdownlintV1LogFileFormat
(#116).ReportIssuesToPullRequest
alias which accepts an issue provider, or a list of issue providers, and settings requires now settings of type IReportIssuesToPullRequestFromIssueProviderSettings
instead of ReportIssuesToPullRequestSettings
to provider additional functionality, like support for File linking and Support for passing additional run information.CreateIssueReport
alias which accepts an issue provider, or a list of issue providers, and settings requires now settings of type ICreateIssueReportFromIssueProviderSettings
instead of CreateIssueReportSettings
to provider additional functionality, like support for File linking and Support for passing additional run information.HtmlDxDataGridOption.FileLinkSettings
has been removed. File link settings can now be defined while reading the issues. For details see File linking. (#265).HtmlDxDataGridOption.JSZipLocation
has been split into HtmlDxDataGridOption.JsZipLocation
and HtmlDxDataGridOption.JsZipVersion
(#320).For details see release notes of the individual addins:
Version 0.9.1 of Cake Issues and Cake.Issues.PullRequests.AzureDevOps have been released. These are minor releases containing improvements and bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
With 0.8.0 file links was implemented in Cake.Issues.Reporting.Generic and worked for any issues passed to the report. With 0.9.0 file link infrastructure was moved to Cake.Issues. File link settings can now be set while reading issues, and are passed through the IIssue.FileLink
property to reports and pull request systems.
While this solution works for issues read by an issue provider, where file link settings can be passed to the ReadIssues
alias, it become much more complicated for issues created using the NewIssue
alias, where an URL can be set, which needs to be resolved manually before.
Cake.Issues 0.9.1 adds an WithFileLinkSettings
method to IIssueBuilder
where a file link setting object can be passed which does resolve the URL.
Cake Issues 0.9.0 added support for line ranges and column information. With 0.9.0 the Azure DevOps pull request integration didn't use this information while posting comments to pull requests. Cake.Issues.PullRequests.AzureDevOps 0.9.1 fixes this and will post comments for line and column ranges if they are available on an issue.
","boost":0.5},{"location":"news/2020/09/19/cake-issues-v091-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues and Cake.Issues.PullRequests.AzureDevOps 0.9.1 are compatible with version 0.9.0 without any breaking changes. To update to the new version bump the version of the specific addins.
","boost":0.5},{"location":"news/2020/09/24/cake-issues-recipe-v042-released-bringing-support-for-github-actions/","title":"Cake Issues Recipe v0.4.2 released, bringing support for GitHub Actions","text":"Version 0.4.2 of Cake Issues Recipe has been released bringing support for GitHub Actions.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake.Issues.Recipe brings support for running under GitHub Actions. Currently supported feature is writing of issues to build server which will show up in the build log grouped by issue provider / run:
Additionally the issues show up as annotations:
Having issues available as annotations also means that they will be shown in pull requests on the related file / position:
It's planned to support remaining features like providing full issue report as artifact in a future release.
Info
Support for GitHub Actions integration is currently only available in Cake.Issues.Recipe, but not as a standalone addin. It's planned to additionally provide a standalone addin which can be used outside of Cake.Issues.Recipe in the future.
","boost":0.5},{"location":"news/2020/09/24/cake-issues-recipe-v042-released-bringing-support-for-github-actions/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Recipe 0.4.2 is compatible with version 0.4.x without any breaking changes. To update to the new version bump the version in your build script.
","boost":0.5},{"location":"news/2020/09/27/new-github-actions-addin/","title":"New GitHub Actions addin","text":"A new Cake.Issues.PullRequest.GitHubActions addin has been released which brings integration with GitHub Actions and GitHub pull requests.
Cake.Issues.PullRequest.GitHubActions addin creates annotations from issues when running on GitHub Actions:
These annotations will also be shown in pull requests on the related file / position, bringing first class integration for GitHub pull requests to Cake.Issues:
This integration was first released in Cake.Issues.Recipe 0.4.2 and has now been moved to its own addin, which can also be used outside of Cake.Issues.Recipe.
","boost":0.5},{"location":"news/2020/10/09/cake-issues-pullrequests-v091-released/","title":"Cake Issues PullRequests v0.9.1 Released","text":"Version 0.9.1 of Cake.Issues.PullRequests has been released. This is a minor releases containing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version fixes a bug where if MaxIssuesToPost
or MaxIssuesToPostAcrossRuns
was set to 0 all issues were posted to the pull request instead of none.
Cake.Issues.PullRequests 0.9.1 is compatible with version 0.9.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2020/10/20/cake-issues-msbuild-v091-released/","title":"Cake Issues MsBuild v0.9.1 Released","text":"Version 0.9.1 of MsBuild support for Cake.Issues has been released. This is a minor release containing improvements.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Until now MsBuild support did read warnings from MsBuild log files. Starting with version 0.9.1 it will also return errors. Reading of errors has been implemented for MsBuildBinaryLogFileFormat
and MsBuildXmlFileLoggerFormat
. For errors IIssue.Priority
will be set to IssuePriority.Error
.
Info
To keep previous behavior result after reading the issues can be filtered for IIssue.Priority == IIssuePriority.Warning
.
Cake.Issues.MsBuild 0.9.1 is compatible with version 0.9.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2020/12/01/cake-issues-recipe-v044-released-bringing-support-for-eslint/","title":"Cake Issues Recipe v0.4.4 released, bringing support for ESLint","text":"Version 0.4.4 of Cake Issues Recipe has been released bringing support for ESLint.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions. For details see full release notes.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake.Issues.Recipe brings support for issues reported by ESLint. Currently supported are files generated using the ESLint json formatter
","boost":0.5},{"location":"news/2020/12/01/cake-issues-recipe-v044-released-bringing-support-for-eslint/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Recipe 0.4.4 is compatible with version 0.4.x without any breaking changes. To update to the new version bump the version in your build script.
","boost":0.5},{"location":"news/2021/07/27/new-addin-for-terraform-support/","title":"New addin for Terraform support","text":"A new Cake.Issues.Terraform addin has been released which adds support for reading issues from Terraform validate
command.
Cake.Issues.Terraform addin brings support for Terraform to the Cake.Issues ecosystem. It allows to read the output of the Terraform validate
command. Together with other Cake.Issues addins it is possible to create powerful infrastructure as code pipelines which ensure quality standards by validating Terraform files before merging or deploying the changes. When using a pull requests workflow it is also possible to have the issues reported by Terraform validate automatically reported as comments to pull request.
More than 4 years after the first commit for Cake.Prca, the predecessor of Cake Issues, we're happy to announce that Cake Issues version 1.0.0 has been released. This is a major release bringing a lot of new features across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 1.x.
","boost":0.5},{"location":"news/2021/07/28/cake-issues-v100-released/#support-for-cake-frosting","title":"Support for Cake Frosting","text":"All addins can be used with Cake Frosting.
Cake Issues addins have always been self-contained, shipping with all required dependencies, to provide the best user experience. While this approach makes sense for Cake script runners, it makes things more complex than required when running under Cake Frosting. This is especially true for the Cake.Issues.Reporting.Generic addin, which uses Razor engine to generate the reports.
It was therefore decided to release separate versions of the Cake.Issues.Reporting.Generic addin for the different script runners:
Cake.Frosting.Issues.Reporting.Generic has the additional benefit for the user that it gives the user full control of what exact version of dependencies should be used. In the future more Cake Issues addins might be released in Frosting specific packages.
","boost":0.5},{"location":"news/2021/07/28/cake-issues-v100-released/#support-for-arbitrary-values-in-an-issue","title":"Support for arbitrary values in an issue","text":"Specific issue providers might have additional information for which no equivalent does exist on IIssue
. These kind of information can now be stored in the IIssue.AdditionalInformation
property.
While there are aliases to get provider type name (e.g. MsBuildIssuesProviderTypeName), this information was in previous versions not available through the IIssueProvider
interface. There is a new IIssueProvider.ProviderType
property which can be used to retrieve the provider type.
A new PDF export has been added to the HtmlDxDataGrid
template of the Cake.Issues.Reporting.Generic
addin.
Starting with Cake Issues 1.0.0 the three core addins Cake.Issues
, Cake.Issues.PullRequests
and Cake.Issues.Reporting
will be always released together. For that source code for the addin has been merged in the Cake.Issues repository. Please open any issues related to any of the core addins in the Cake.Issues issue tracker.
Cake.Issues 1.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
IIssueProvider
was extended with an additional ProviderType
property. For issue providers inheriting from BaseIssueProvider
no action is required to keep the same behavior as with previous versions, with the type name used as provider type.Info
Cake.Recipe has not been updated to 1.0 yet.
For details see release notes of the individual addins:
Version 1.0.1 of ESLint support for Cake.Issues has been released. This is a minor release containing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
When an issue reported by ESLint didn't contain line or column information, or rule was set to null
an exception ocurred while parsing the file. This release fixes this and can now also correctly parse issues without position or rule information.
Cake.Issues.EsLint 1.0.1 is compatible with version 1.0.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/","title":"Cake Issues Recipe v1.0.0 Released, bringing support for Cake Frosting","text":"Hard on the heels of the announcement for release 1.0 of Cake.Issues addins, we're happy to announce release 1.0 of the recipe script for Cake.Issues.
This is a major release bringing support for Cake Frosting and other new features.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Cake Issues recipe has been updated to use latest 1.x versions of the Cake.Issues addins which support Cake 1.x.
See announcement for release 1.0 of Cake.Issues addins for features added in the individual addins.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#support-for-cake-frosting","title":"Support for Cake Frosting","text":"Additionally to the existing Cake.Issues.Recipe package, which works fine for Cake script runners, there's a new Cake.Frosting.Issues.Recipe package suitable for builds using Cake Frosting.
See Using Cake.Frosting.Issues.Recipe for an example.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#support-for-environments-not-compatible-with-cakegit-addin","title":"Support for environments not compatible with Cake.Git addin","text":"In previous versions Cake.Issues recipes had used Cake.Git addin to determine state of the Git repository. While this works in most cases, there are some environments where Cake.Git addin currently does not work.
Starting with this version it is now possible to define if Cake.Git addin or Git CLI should be used.
See Git repository information configuration for details.
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#define-settings-for-issue-providers","title":"Define settings for issue providers","text":"Previous versions of Cake.Issues recipes used default settings for reading issues from the passed log files. This made it impossible to parse log files which for example are created by tools running in containers, as they have a root path different to the repository root.
This version introduced methods to pass log files to the recipe scripts, which additionally to the log file path accept a settings object.
The new implementation also supports other use-cases like reading multiple files with the same issues provider, but different settings (e.g. run information).
","boost":0.5},{"location":"news/2021/08/04/cake-issues-recipe-v100-released-bringing-support-for-cake-frosting/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues Recipes 1.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
IssuesParameters.InputFiles.MsBuildXmlFileLoggerLogFilePath
property:IssuesParameters.InputFiles.MsBuildXmlFileLoggerLogFilePath = @\"c:\\build\\msbuild.log\";\n
With 1.0 the IssuesParameters.InputFiles.AddMsBuildXmlFileLoggerLogFile()
method needs to be called instead:
IssuesParameters.InputFiles.AddMsBuildXmlFileLoggerLogFile(@\"c:\\build\\msbuild.log\");\n
For details see full release notes
","boost":0.5},{"location":"news/2021/08/11/cake-issues-recipes-v110-released/","title":"Cake Issues Recipes v1.1.0 released","text":"Version 1.1.0 of Cake Issues recipes have been released adding support to customize report generation.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake Issues recipes adds a new FullIssuesReportSettings
configuration parameter which allows to customize the generated issue report. See Report creation parameters for details.
The following example enables exporting of the report when using Cake.Issues.Recipe:
IssuesParameters.Reporting.FullIssuesReportSettings\n .WithOption(HtmlDxDataGridOption.EnableExporting, true)\n
The following example enables exporting of the report when using Cake.Frosting.Issues.Recipe:
context.Parameters.Reporting.FullIssuesReportSettings\n .WithOption(HtmlDxDataGridOption.EnableExporting, true)\n
","boost":0.5},{"location":"news/2021/08/11/cake-issues-recipes-v110-released/#updated-addins","title":"Updated addins","text":"Cake.Git
has been updated to version 1.1.0 which comes with an updated version of LibGit2Sharp which adds support for Ubuntu 20.
See Cake.Git 1.1.0 release notes for details.
","boost":0.5},{"location":"news/2021/08/11/cake-issues-recipes-v110-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake Issues recipes 1.1.0 are compatible with version 1.x without any breaking changes. To update to the new version bump the version in your build.
","boost":0.5},{"location":"news/2021/08/19/cake-issues-recipes-v120-released/","title":"Cake Issues Recipes v1.2.0 released","text":"Version 1.2.0 of Cake Issues recipes have been released adding support to customize issue reporting to pull requests.
This post shows the highlights included in this release. For details see full release notes. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake Issues recipes adds several new configuration parameter which allows to customize how issues are reported to pull requests. See Pull request integration parameters for details.
The following example limits the number of issues posted to pull requests to 20
when using Cake.Issues.Recipe:
IssuesParameters.PullRequestSystem.MaxIssuesToPost = 20;\n
The following example limits the number of issues posted to pull requests to 20
when using Cake.Frosting.Issues.Recipe:
context.Parameters.PullRequestSystem.MaxIssuesToPost = 20;\n
","boost":0.5},{"location":"news/2021/08/19/cake-issues-recipes-v120-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake Issues recipes 1.2.0 are compatible with version 1.x without any breaking changes. To update to the new version bump the version in your build.
","boost":0.5},{"location":"news/2021/08/29/new-addin-for-printing-issues-to-console/","title":"New addin for printing issues to console","text":"A new Cake.Issues.Reporting.Console addin has been released which allows to output issues to the console.
Cake.Issues.Reporting.Console addin can be used to print issues to the console and is built on top of the excellent Errata library by Patrik Svensson.
Its main focus is to annotate source code with issues:
It currently only supports issues containing line and column information. Output can be grouped by rule, like in the image above, or individual entries for every issue.
Beside printing issues it can also show summary tables.
There's one summary which shows the number of issues for everyprovider and run:
Another summary shows the number of issues by priority for every provider and run:
","boost":0.5},{"location":"news/2021/08/31/cake-issues-markdownlint-v110-released/","title":"Cake Issues Markdownlint v1.1.0 Released","text":"Version 1.1.0 of Markdownlint support for Cake.Issues has been released. This is a minor release adding features and improvements.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Since version 0.28.0 markdownlint-cli supports a --json
option to output result in JSON format. This version adds support for this format through the MarkdownlintCliJsonLogFileFormat alias.
This release of Cake.Issues.Markdownlint enhances the MarkdownlintCliLogFileFormat to provide column information if reported by markdownlint.
","boost":0.5},{"location":"news/2021/08/31/cake-issues-markdownlint-v110-released/#recipe-packages","title":"Recipe packages","text":"Cake Issues recipes have been released in version 1.3.0 shipping with Cake.Issues.Markdownlint 1.1.0 and adding support for markdownlint-cli JSON files.
","boost":0.5},{"location":"news/2021/08/31/cake-issues-markdownlint-v110-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Markdownlint 1.1.0 is compatible with version 1.0.0 without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/","title":"Cake Issues Reporting Console v0.3.0 released, adding support for all Cake runners","text":"Version 0.3.0 of Cake.Issues.Reporting.Console has been released. This is a minor release adding features and improvements.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Starting with this release Cake.Issues.Reporting.Console will target .NET Standard 2.0 instead of .NET 5.0 and therefore will support all Cake runners.
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/#improved-reporting","title":"Improved reporting","text":"Provider report is now rendered in different colors for the individual bars, making it easier to read:
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/#errata-060","title":"Errata 0.6.0","text":"Underlying Errata library has been updated to 0.6.0, containing additional bug fixes and rendering improvements.
","boost":0.5},{"location":"news/2021/09/05/cake-issues-reporting-console-v030-released-adding-support-for-all-cake-runners/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues.Reporting.Console 0.3.0 is compatible with previous versions without any breaking changes. To update to the new version bump the version of the addin.
","boost":0.5},{"location":"news/2022/12/10/cake-issues-v200-released/","title":"Cake Issues v2.0.0 Released","text":"After several months with beta releases Cake Issues version 2.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 2.x.
Target framework have been updated to .NET Core 3.1, .NET 5 and .NET 6 to be in line with Cake. See Sunsetting of .NET Framework and .NET Core runners in Cake 2.0 for details.
","boost":0.5},{"location":"news/2022/12/10/cake-issues-v200-released/#support-for-msbuild-binary-logs-version-9","title":"Support for MsBuild binary logs version 9","text":"Support for binary logs in version 9 has been added to Cake.Issues.MsBuild
.
Cake.Issues 2.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
5
. Older version are still supported for deserialization.ProviderIssueIssueLimits
has been renamed to ProviderIssueLimits
IIssue.Rule
has been renamed to IIssue.RuleId
IIssue
was extended with an additional RuleName
property.For details see release notes of the individual addins:
Cake Issues version 3.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 3.x.
Target framework have been updated to .NET 6 and .NET 7 to be in line with Cake.
","boost":0.5},{"location":"news/2023/07/22/cake-issues-v300-released/#support-for-msbuild-binary-logs-version-16","title":"Support for MsBuild binary logs version 16","text":"Support for binary logs in version 16 has been added to Cake.Issues.MsBuild
.
Cake.Issues.MsBuild
now will automatically provide links for Roslynator and SonarLint rules. Links for CA
rules have updated to link to learn.microsoft.com
.
Cake.Issues 3.0.0 is a breaking release, which means that it probably requires changes to your build script. This section documents the most common changes which might be required:
StringPathExtensions.IsValideRepositoryFilePath
has been renamed to StringPathExtensions.IsValidRepositoryFilePath
BaseRuleDescription.Rule
has been made immutable after initializationDupFinderLogFilePaths
is no longer available. To keep using DupFinder you need to manually add Cake.Issues.DupFinder
and add issues using the AddIssues
method.For details see release notes of the individual addins:
Version 3.1.0 of Cake Issues recipes have been released adding support for creating of reports in SARIF format.
This post shows the highlights included in this release. For details see full release notes. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This version of Cake Issues recipes adds a new configuration parameter which allows to create reports in SARIF format allowing further processing in a lot of different tools also supporting the SARIF standard. See Report parameters for details.
If running on Azure Pipelines the generated SARIF file is uploaded so that it will be shown in the SARIF SAST Scans Tab extension.
","boost":0.5},{"location":"news/2023/08/16/cake-issues-recipes-v310-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake Issues recipes 3.1.0 are compatible with version 3.x without any breaking changes. To update to the new version bump the version in your build.
","boost":0.5},{"location":"news/2023/12/23/cake-issues-v400-released/","title":"Cake Issues v4.0.0 Released","text":"Cake Issues version 4.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 4.x.
Target framework have been updated to .NET 6, .NET 7 and .NET 8 to be in line with Cake.
","boost":0.5},{"location":"news/2023/12/23/cake-issues-v400-released/#switch-to-systemtextjson-for-serialization","title":"Switch to System.Text.Json for serialization","text":"For serialization / deserialization of issues LitJson was used internally. With Cake.Issues 4.0 internal code has been changed to use System.Text.Json classes.
The change should not have any impact for users.
","boost":0.5},{"location":"news/2023/12/23/cake-issues-v400-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"While Cake.Issues 4.0.0 is a breaking release, there are no breaking changes beside the update to Cake 4.x and the changes to target framework version.
For details see release notes
","boost":0.5},{"location":"news/2024/01/14/alignment-of-addin-lifecycles/","title":"Alignment of addin lifecycles","text":"Cake Issues has a modular architecture consisting of multiple addins. Historically every addin had its own independent release lifecycle. Starting with the next release work will begin to have all addins share the same release lifecycle.
When Cake Issues started all three core addins (Cake.Issues
, Cake.Issues.Reporting
and Cake.Issues.PullRequsts
) and every issue provider, report format and pull request system addin were released on their own schedule, allowing fast iterations of individual components. With the release of Cake Issues 1.0 the release lifecycle of the three core addins have been aligned, resulting in a simplified release process.
Starting with the next release we'll begin to move also the remaining issue provider, report format and pull request system addins into the main Cake Issues repository and have them released together with the core addins.
","boost":0.5},{"location":"news/2024/02/21/cake-issues-v410-released/","title":"Cake Issues v4.1.0 Released","text":"Cake Issues version 4.1.0 has been released with improvements for Cake Frosting and support for latest MsBuild binary log format.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Cake.Frosting.Issues.Reporting and Cake.Frosting.Issues.PullRequests have been released as optimized version of the Cake.Issues.Reporting
and Cake.Issues.PullRequests
for Cake Frosting.
These addins come with a dependency to the core Cake.Issues
addin, allowing it to be consumed as transitive dependency.
Support for binary logs in version 18 has been added to Cake.Issues.MsBuild
.
As announced in Alignment of addin lifecycles work as started to move addins into the main Cake Issues repository.
Starting with this release the following addins will be released together with the core addins:
Cake.Issues 4.1.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/14/cake-issues-v420-released/","title":"Cake Issues v4.2.0 Released","text":"Cake Issues version 4.2.0 has been released introducing a new issue provider for SARIF compatible files.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
A new Cake.Issues.Sarif addin has been released which adds support for reading issues in SARIF format.
See New addin for reading SARIF files for details.
","boost":0.5},{"location":"news/2024/04/14/cake-issues-v420-released/#improvement-for-cake-frosting","title":"Improvement for Cake Frosting","text":"Optimized versions for Cake Frosting have been released for the following addins:
These addins come with a dependency to the core addins, allowing the core addins to be consumed as transitive dependencies.
","boost":0.5},{"location":"news/2024/04/14/cake-issues-v420-released/#alignment-of-release-lifecycle","title":"Alignment of release lifecycle","text":"As announced in Alignment of addin lifecycles work as started to move addins into the main Cake Issues repository.
Starting with this release the following addins will be released together with the core addins:
Cake.Issues 4.2.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/14/new-addin-for-reading-sarif-files/","title":"New addin for reading SARIF files","text":"A new Cake.Issues.Sarif addin has been released which adds support for reading issues in SARIF format.
SARIF is an industry standard format for the output of static analysis tools. With the introduction of SARIF support through the Cake.Issues.Sarif addin any tool which can output results in SARIF format can now be used together with Cake Issues.
See Supported Tools for an updated list of supported tools.
The addins is available in a version for Cake .NET Tool (Cake.Issues.Sarif) and Cake Frosting (Cake.Frosting.Issues.Sarif).
","boost":0.5},{"location":"news/2024/04/16/cake-issues-v421-released/","title":"Cake Issues v4.2.1 Released","text":"Cake Issues version 4.2.1 has been released with compatibility fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
As a side-effect of moving all addins to the central Cake Issues repository, AssemblyVersion
of every has been set to the release version.
Addins are backwards compatible though to latest major version, which was no longer possible with this change.
This release fixes this by setting the AssemblyVersion
to the major version (currently 4.0.0
).
Cake.Issues 4.2.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/20/cake-issues-v430-released/","title":"Cake Issues v4.3.0 Released","text":"Cake Issues version 4.3.0 has been released with support for MsBuild binary log format version 20.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 20 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.3.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/04/25/cake-issues-v431-released/","title":"Cake Issues v4.3.1 Released","text":"Cake Issues version 4.3.1 has been released bringing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes an exception if an issue provider reports an issue across multiple lines and the end column is before the start column.
","boost":0.5},{"location":"news/2024/04/25/cake-issues-v431-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.3.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/05/18/cake-issues-v440-released/","title":"Cake Issues v4.4.0 Released","text":"Cake Issues version 4.4.0 has been released with improvements for Cake Frosting.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for implicit usings has been added to the Cake Frosting addins.
If <ImplicitUsings>enable</ImplicitUsings>
is set in a Cake Frosting build, namespaces for Cake Issues addins are implicitly added, resulting in a similar experience as when using Cake .NET Tool, where aliases can be used directly without the requirements to first add using
statements.
The HTML DevExtreme Data Grid template now supports search boxes in filter dropdowns.
See Header Filter Customization in DataGrid for details.
","boost":0.5},{"location":"news/2024/05/18/cake-issues-v440-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.4.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/05/23/cake-issues-v450-released/","title":"Cake Issues v4.5.0 Released","text":"Cake Issues version 4.5.0 has been released adding support for build breaking.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
New BreakBuildOnIssues aliases have been introduced to fail builds when issues are found.
See build breaking for an example.
","boost":0.5},{"location":"news/2024/05/23/cake-issues-v450-released/#possibility-to-define-license-for-html-devextreme-data-grid","title":"Possibility to define license for HTML DevExtreme Data Grid","text":"Starting with version 23.2
DevExtreme no longer comes with a free community license. HTML DevExtreme Data Grid template will stay on version 23.1
for this reason.
If you have a DevExtreme license you can pass it to the new DevExtremeLicenseKey
option and update to a newer version using the DevExtremeVersion
option.
Cake.Issues 4.5.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/05/24/cake-issues-v451-released/","title":"Cake Issues v4.5.1 Released","text":"Cake Issues version 4.5.1 has been released containing bug fixes.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes verbose output of Cake.Issues.PullRequests
for provider issue limits.
Cake.Issues 4.5.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/06/24/cake-issues-v460-released/","title":"Cake Issues v4.6.0 Released","text":"Cake Issues version 4.6.0 has been released with improvements for SARIF reports.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
A new option SarifIssueReportFormatSettings.ExistingIssues has been introduced which allows to pass in a list of known issues not related to current code changes, resulting in the baselineState property being set in the resulting SARIF report.
This property is for example be used in the SARIF viewer extension for Azure Pipelines as filter option.
The following new settings options have been added:
SarifIssueReportFormatSettings property Output property Description Guid automationDetails.guid Unique, stable identifier for the run BaselineGuid run.baselineGuid String equal to Guid of a previous run CorrelationGuid automationDetails.correlationGuid Guid shared by all runs of the same type","boost":0.5},{"location":"news/2024/06/24/cake-issues-v460-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.6.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/16/cake-issues-v470-released/","title":"Cake Issues v4.7.0 Released","text":"Cake Issues version 4.7.0 has been released with detailed line information for SARIF issue provider and support for MsBuild binary log format version 21.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 21 has been added to Cake.Issues.MsBuild
.
Cake.Issues.Sarif
has been enhanced to also provide the following IIssue
properties if available:
IIssue.EndLine
IIssue.Column
IIssue.EndColumn
Cake.Issues 4.7.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/17/cake-issues-v471-released/","title":"Cake Issues v4.7.1 Released","text":"Cake Issues version 4.7.1 has been released with bugfixes for SARIF reports
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes two bugs in Cake.Issues.Reporting.Sarif
:
0
as ruleIndex
instead of 1
originalUriBaseIds
should end with a slash as defined in SARIF Specification 2.1.0 \u00a73.14.14.Cake.Issues 4.7.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/18/cake-issues-v472-released/","title":"Cake Issues v4.7.2 Released","text":"Cake Issues version 4.7.2 has been released containing bug fixes for generic reporting addin.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes an bug in Cake.Issues.Reporting.Generic
where it was not possible to overwrite version of JsPdf version used in HTML DevExtreme Data Grid template.
Cake.Issues 4.7.2 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/19/cake-issues-v480-released/","title":"Cake Issues v4.8.0 Released","text":"Cake Issues version 4.8.0 has been released with improvements for SARIF issue provider.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
In previous releases the SARIF issue provider used the tool name defined in the SARIF file for a specific run as issue provider. This has the advantage that if multiple SARIF files from different sources are read, every issue has a different issue provider name, which reflects the original tool.
But it can also have side-effect, for example that different states are reported to pull request depending if run is successful or not (see cake-contrib/Cake.Issues.Recipe#477), because the actual issue provider name is only known once there are issues reported.
This release introduces a new option SarifIssuesSettings.UseToolNameAsIssueProviderName to define whether the tool name reported in the SARIF log or a fixed value should be used as issue provider name.
","boost":0.5},{"location":"news/2024/07/19/cake-issues-v480-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.8.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/25/cake-issues-v490-released/","title":"Cake Issues v4.9.0 Released","text":"Cake Issues version 4.9.0 has been released with bugfixes for SARIF report format and Terraform issue provider.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes an issue where entries in a SARIF report were marked as updated if branch or commit in file link has changed.
To achieve this, a new constructor for the generic IIssueComparer
has been introduced, which allows to define which IIssue
properties should be ignored for the comparison.
A bug has been fixed where root directory was not correctly determined when running on Linux or macOS.
","boost":0.5},{"location":"news/2024/07/25/cake-issues-v490-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 4.9.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/07/30/cake-issues-v4100-released/","title":"Cake Issues v4.10.0 Released","text":"Cake Issues version 4.10.0 has been released with support for MsBuild binary log format version 22.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 20 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.10.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/08/20/cake-issues-v4101-released/","title":"Cake Issues v4.10.1 Released","text":"Cake Issues version v4.10.1 has been released with bugfixes for Cake Frosting and file linking
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes dependencies of the following Cake Frosting optimized NuGet packages:
This release fixes an issue that file links are created for issues which are not related to a file.
","boost":0.5},{"location":"news/2024/08/20/cake-issues-v4101-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues v4.10.1 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/10/06/cake-issues-v4110-released/","title":"Cake Issues v4.11.0 Released","text":"Cake Issues version 4.11.0 has been released with support for MsBuild binary log format version 23.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 23 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.11.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/11/05/cake-issues-v4120-released/","title":"Cake Issues v4.12.0 Released","text":"Cake Issues version 4.12.0 has been released with support for MsBuild binary log format version 24.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
Support for binary logs in version 24 has been added to Cake.Issues.MsBuild
.
Cake.Issues 4.12.0 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/12/02/cake-issues-v500-released/","title":"Cake Issues v5.0.0 Released","text":"Cake Issues version 5.0.0 has been released. This is a major release, containing breaking changes beside bringing new features and bug fixes across all addins.
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
All addins have been updated to support Cake 5.x.
Target framework have been updated to .NET 8 and .NET 9 to be in line with Cake.
","boost":0.5},{"location":"news/2024/12/02/cake-issues-v500-released/#improvements-for-cake-frosting","title":"Improvements for Cake Frosting","text":"Cake.Frosting.Issues.PullRequests.AzureDevOps
now references Cake.Frosting.AzureDevOps
, a version of Cake.AzureDevOps
, optimized for Cake Frosting.
Instead of shipping client assemblies to access Azure DevOps as part of Cake.AzureDevOps
, Cake.Frosting.AzureDevOps
references the corresponding NuGet packages, which for example allows to control version of the libraries used.
Transitive dependencies which contain known security vulnerabilities have been updated to newer versions where the vulnerabilities are fixed.
","boost":0.5},{"location":"news/2024/12/02/cake-issues-v500-released/#updating-from-previous-versions","title":"Updating from previous versions","text":"Cake.Issues 5.0.0 is a breaking release, which means that there is a small change that changes to your build script are required.
For details see release notes
","boost":0.5},{"location":"news/2024/12/17/cake-issues-v501-released/","title":"Cake Issues v5.0.1 Released","text":"Cake Issues version 5.0.1 has been released containing bug fixes for Cake Frosting addins
This post shows the highlights included in this release. For update instructions skip to Updating from previous versions.
\u2764 Huge thanks to our community! This release would not have been possible without your support and contributions! \u2764
People working on this release:
This release fixes dependencies of the following Cake Frosting optimized NuGet packages:
Cake.Issues 4.7.2 addins are compatible with any 4.x addins. To update to the new version bump the version of the specific addins.
For details see release notes
","boost":0.5},{"location":"news/2024/12/21/new-website/","title":"New website","text":"Today a new version of the Cake Issues website has been published.
The Cake Issues website was introduced 2017 as a static website built using Wyam, like the Cake website. Using Wyam allowed to add full API documentation and other features like list of addins or overview of open issues across all addins.
Wyam is no longer maintained, with Statiq as its successor. Unfortunately also the deployment pipeline for the Cake Issues website stopped working in 2023, resulting in the website no longer receiving updates.
Since the introduction of the Cake Issues website seven years ago, the Cake website also has been improved, among other things, with a dedicated page for each addin listing the aliases the addin provides. These improvements made a full API documentation on Cake Issues website somehow redundant.
With .NET API documentation no longer being a requirement there are much more tooling options available. The choice was made to use Material for MkDocs, which comes with a lot of features for writing technical documentation.
One of the features of the new website is support for multiple versions using mike. https://cakeissues.net/latest/
will always point to the documentation of the latest released version. https://cakeissues.net/develop/
points to the documentation of the current development branch. Beside that there's now a version selector in the header to show documentation for any old version.
2024 had been an amazing year for Cake Issues. In this post we'll look back to what had been achieved in 2024.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#alignment-of-addin-lifecycles","title":"Alignment of addin lifecycles","text":"2024 started with an announcement to consolidate all Cake Issue addins into the main Cake.Issues GitHub repository, which has been finished by now.
Beside having all addins share a release lifecycle, having them in a single repository also simplified maintenance work and release process. This resulted in a total of 20 releases of Cake Issues in 2024, including one major release with 5.0.0, bringing constant improvements and bugfixes.
Core Cake.Issues
addin has seen a steady, and stronger than 2023, rise of downloads during 2024, resulting in nearly 1 million downloads by the end of the year:
See NuGet Trends for details.
The individual addins had a different age, some up to 7 years old, written for .NET Framework. As part of the consolidation of all addins in a single mono-repository effort was made to unify and modernize the code base across all addins.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#new-addins","title":"New addins","text":"With the introduction of Cake.Issues.Sarif a lot of additional tools supporting the SARIF standard are now supported by Cake Issues as listed on Supported Tools.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#improvements-for-cake-frosting","title":"Improvements for Cake Frosting","text":"Several improvements were released during 2024 for running Cake Issues with Cake Frosting.
For all addins a NuGet package optimized for running with Cake Frosting is now available. These NuGet packages have dependencies to Cake, Cake Issues core addins or any other required dependency defined, which gives full control about the dependency, their version and update behavior to the user through the standard .NET project system.
These packages also support implicit usings improving discoverability of aliases for build authors. Implicit usings can be enabled by setting <ImplicitUsings>enable</ImplicitUsings>
in the csproj file of a build.
The end of 2024 saw also the relaunch of Cake Issues website, which has been updated to modern standards and tooling. Effort has also been put into content to improve discoverability of documentation for users. Examples and documentation have also been updated to latest Cake Issues and .NET version.
","boost":0.5},{"location":"news/2025/01/01/2024-in-review/#thanks","title":"Thanks","text":"\u2764 Huge thanks to our community! All what had been achieved in 2024 would not have been possible without the support and contributions of the community! \u2764
People contributing to Cake Issues in 2024: