From 22cabc3c41f3d10c13cb88a94303251bf0f72eb9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 19:53:30 +0000 Subject: [PATCH 1/6] Initial plan From f1f35cf0206d52a8075af17710aecd43afb2353f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 20:03:27 +0000 Subject: [PATCH 2/6] Plan: Improve Console report format documentation with examples and screenshots Co-authored-by: pascalberger <2190718+pascalberger@users.noreply.github.com> --- tests/Cake.Issues.Reporting.Console/script-runner/build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/Cake.Issues.Reporting.Console/script-runner/build.sh diff --git a/tests/Cake.Issues.Reporting.Console/script-runner/build.sh b/tests/Cake.Issues.Reporting.Console/script-runner/build.sh old mode 100644 new mode 100755 From 14f91a9f96d86905b92b4195b6205c10b567a855 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 20:17:01 +0000 Subject: [PATCH 3/6] Improve Console report format documentation with examples and screenshots Co-authored-by: pascalberger <2190718+pascalberger@users.noreply.github.com> --- .../console-examples/console-combined.png | 3 + .../console-examples/console-default.png | 3 + .../console-examples/console-grouped.png | 3 + .../console-examples/console-summaries.png | 3 + .../report-formats/console/examples.md | 142 +++++++++++++++++- 5 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 docs/input/assets/images/console-examples/console-combined.png create mode 100644 docs/input/assets/images/console-examples/console-default.png create mode 100644 docs/input/assets/images/console-examples/console-grouped.png create mode 100644 docs/input/assets/images/console-examples/console-summaries.png diff --git a/docs/input/assets/images/console-examples/console-combined.png b/docs/input/assets/images/console-examples/console-combined.png new file mode 100644 index 000000000..db3478b4b --- /dev/null +++ b/docs/input/assets/images/console-examples/console-combined.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44a14ffbc7ba546a335d64d8e8acba22db5d7beaa1285ce891bdacdd15adc29c +size 80331 diff --git a/docs/input/assets/images/console-examples/console-default.png b/docs/input/assets/images/console-examples/console-default.png new file mode 100644 index 000000000..0c3166205 --- /dev/null +++ b/docs/input/assets/images/console-examples/console-default.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e238bcca03e225131b7aee59fb1901ed6a81afeb93ecd09220e81b3d58ee2d9b +size 42819 diff --git a/docs/input/assets/images/console-examples/console-grouped.png b/docs/input/assets/images/console-examples/console-grouped.png new file mode 100644 index 000000000..250665818 --- /dev/null +++ b/docs/input/assets/images/console-examples/console-grouped.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b230cb2749f6e9c84f90c9ada0af84b5e6204a44a0aa0f82c21b39f59965b44 +size 65960 diff --git a/docs/input/assets/images/console-examples/console-summaries.png b/docs/input/assets/images/console-examples/console-summaries.png new file mode 100644 index 000000000..de8b8f7f9 --- /dev/null +++ b/docs/input/assets/images/console-examples/console-summaries.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c1c2f1c6c62ca7acc043aacdfe34da180c794a84bab4697563a645c3baf443e +size 72825 diff --git a/docs/input/documentation/report-formats/console/examples.md b/docs/input/documentation/report-formats/console/examples.md index 93036b1b0..60f3af86b 100644 --- a/docs/input/documentation/report-formats/console/examples.md +++ b/docs/input/documentation/report-formats/console/examples.md @@ -52,7 +52,147 @@ For this example the MsBuild issue provider is additionally used for reading iss ``` -The following example will print issues logged as warnings by MsBuild to the console. +## Console Output Examples + +The Console report format can be configured with various settings to customize the output. Below are examples showing different configuration options and their visual impact. + +### Default Settings + +By default, the Console report format shows individual diagnostics for each issue: + +=== "Cake .NET Tool" + + ```csharp title="build.cake" + CreateIssueReport( + issues, + ConsoleIssueReportFormat(), + repoRootPath, + string.Empty); + ``` + +=== "Cake Frosting" + + ```csharp title="Program.cs" + context.CreateIssueReport( + issues, + context.ConsoleIssueReportFormat(), + repoRootPath, + string.Empty); + ``` + +![Default Console Output](../../assets/images/console-examples/console-default.png) + +### Grouped by Rule + +When `GroupByRule` is set to `true`, issues with the same rule ID are grouped together: + +=== "Cake .NET Tool" + + ```csharp title="build.cake" + CreateIssueReport( + issues, + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + GroupByRule = true + }), + repoRootPath, + string.Empty); + ``` + +=== "Cake Frosting" + + ```csharp title="Program.cs" + context.CreateIssueReport( + issues, + context.ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + GroupByRule = true + }), + repoRootPath, + string.Empty); + ``` + +![Grouped by Rule Output](../../assets/images/console-examples/console-grouped.png) + +### With Summary Tables + +Enable summary tables to see issue counts by provider and priority: + +=== "Cake .NET Tool" + + ```csharp title="build.cake" + CreateIssueReport( + issues, + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + ShowProviderSummary = true, + ShowPrioritySummary = true + }), + repoRootPath, + string.Empty); + ``` + +=== "Cake Frosting" + + ```csharp title="Program.cs" + context.CreateIssueReport( + issues, + context.ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + ShowProviderSummary = true, + ShowPrioritySummary = true + }), + repoRootPath, + string.Empty); + ``` + +![Console Output with Summaries](../../assets/images/console-examples/console-summaries.png) + +### Combined Features + +Combine grouping with summary tables for the most comprehensive output: + +=== "Cake .NET Tool" + + ```csharp title="build.cake" + CreateIssueReport( + issues, + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + GroupByRule = true, + ShowProviderSummary = true, + ShowPrioritySummary = true + }), + repoRootPath, + string.Empty); + ``` + +=== "Cake Frosting" + + ```csharp title="Program.cs" + context.CreateIssueReport( + issues, + context.ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + GroupByRule = true, + ShowProviderSummary = true, + ShowPrioritySummary = true + }), + repoRootPath, + string.Empty); + ``` + +![Combined Features Output](../../assets/images/console-examples/console-combined.png) + +## Complete Build Example + +The following example shows how to build a solution and create a console report with MsBuild issues: === "Cake .NET Tool" From 8a741b557947655d602f4980e93b53c1ebf29b67 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 20:36:23 +0000 Subject: [PATCH 4/6] Add console report example scripts for regenerating screenshots Co-authored-by: pascalberger <2190718+pascalberger@users.noreply.github.com> --- .../.config/dotnet-tools.json | 12 + .../scripts/console-examples/.gitignore | 14 + .../assets/scripts/console-examples/README.md | 57 ++ .../console-examples/generate-combined.cake | 43 ++ .../console-examples/generate-default.cake | 37 + .../console-examples/generate-grouped.cake | 41 + .../console-examples/generate-summaries.cake | 42 ++ .../scripts/console-examples/global.json | 7 + .../scripts/console-examples/nuget.config | 11 + .../scripts/console-examples/run-examples.sh | 17 + .../console-examples/sample-issues.json | 698 ++++++++++++++++++ .../script-runner/temp.cake | 39 + 12 files changed, 1018 insertions(+) create mode 100644 docs/input/assets/scripts/console-examples/.config/dotnet-tools.json create mode 100644 docs/input/assets/scripts/console-examples/.gitignore create mode 100644 docs/input/assets/scripts/console-examples/README.md create mode 100644 docs/input/assets/scripts/console-examples/generate-combined.cake create mode 100644 docs/input/assets/scripts/console-examples/generate-default.cake create mode 100644 docs/input/assets/scripts/console-examples/generate-grouped.cake create mode 100644 docs/input/assets/scripts/console-examples/generate-summaries.cake create mode 100644 docs/input/assets/scripts/console-examples/global.json create mode 100644 docs/input/assets/scripts/console-examples/nuget.config create mode 100755 docs/input/assets/scripts/console-examples/run-examples.sh create mode 100644 docs/input/assets/scripts/console-examples/sample-issues.json create mode 100644 tests/Cake.Issues.Reporting.Console/script-runner/temp.cake diff --git a/docs/input/assets/scripts/console-examples/.config/dotnet-tools.json b/docs/input/assets/scripts/console-examples/.config/dotnet-tools.json new file mode 100644 index 000000000..43e6f74ce --- /dev/null +++ b/docs/input/assets/scripts/console-examples/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "5.0.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/.gitignore b/docs/input/assets/scripts/console-examples/.gitignore new file mode 100644 index 000000000..8aee3d2b0 --- /dev/null +++ b/docs/input/assets/scripts/console-examples/.gitignore @@ -0,0 +1,14 @@ +# Tool artifacts +tools/ +.dotnet/ + +# Build artifacts +bin/ +obj/ + +# NuGet packages +*.nupkg +packages/ + +# Cake Build +.cake/ \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/README.md b/docs/input/assets/scripts/console-examples/README.md new file mode 100644 index 000000000..0b6957999 --- /dev/null +++ b/docs/input/assets/scripts/console-examples/README.md @@ -0,0 +1,57 @@ +# Console Report Format Example Scripts + +This directory contains scripts used to generate the console output screenshots shown in the Console report format documentation. + +## Purpose + +These scripts allow reproducing the console output examples to: +- Regenerate screenshots when the addin is updated +- Test different console formatting options +- Validate console output behavior + +## Scripts + +- `generate-default.cake` - Default console output settings +- `generate-grouped.cake` - Console output grouped by rule +- `generate-summaries.cake` - Console output with provider and priority summaries +- `generate-combined.cake` - Console output with all features enabled +- `sample-issues.json` - Sample issues data used by all scripts + +## Usage + +To regenerate the console output for screenshots: + +1. Ensure the latest Cake.Issues packages are built: + ```bash + cd /path/to/Cake.Issues + ./build.sh --target=Create-NuGet-Packages + ``` + +2. Run any of the example scripts: + ```bash + cd docs/input/assets/scripts/console-examples + dotnet tool restore + dotnet tool run dotnet-cake generate-default.cake --verbosity=minimal + ``` + + Or run all examples at once: + ```bash + ./run-examples.sh + ``` + +3. Capture the console output for documentation screenshots + +## Example Output + +To see the individual issue details, run with normal verbosity. To see just the summaries (as shown in the screenshots), use `--verbosity=minimal`. + +## Sample Data + +The `sample-issues.json` file contains realistic issue data representing: +- MSBuild compiler warnings and suggestions +- DupFinder duplicate code detection issues +- InspectCode style and best practice violations +- markdownlint documentation issues +- Custom script issues + +This data produces output similar to what users would see in real projects. \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/generate-combined.cake b/docs/input/assets/scripts/console-examples/generate-combined.cake new file mode 100644 index 000000000..bf4726264 --- /dev/null +++ b/docs/input/assets/scripts/console-examples/generate-combined.cake @@ -0,0 +1,43 @@ +#addin "Cake.Issues&prerelease" +#addin "Cake.Issues.Reporting&prerelease" +#addin "Cake.Issues.Reporting.Console&prerelease" + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Print-Issues-Combined") + .Does(() => +{ + Information("Running Console Report with All Features Enabled"); + + var issues = DeserializeIssuesFromJsonFile("sample-issues.json"); + Information("Read {0} issues", issues.Count()); + + CreateIssueReport( + issues, + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + GroupByRule = true, + ShowProviderSummary = true, + ShowPrioritySummary = true + }), + @".", + string.Empty); +}); + +Task("Default") + .IsDependentOn("Print-Issues-Combined"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/generate-default.cake b/docs/input/assets/scripts/console-examples/generate-default.cake new file mode 100644 index 000000000..4007ebde7 --- /dev/null +++ b/docs/input/assets/scripts/console-examples/generate-default.cake @@ -0,0 +1,37 @@ +#addin "Cake.Issues&prerelease" +#addin "Cake.Issues.Reporting&prerelease" +#addin "Cake.Issues.Reporting.Console&prerelease" + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Print-Issues-Default") + .Does(() => +{ + Information("Running Console Report with Default Settings"); + + var issues = DeserializeIssuesFromJsonFile("sample-issues.json"); + Information("Read {0} issues", issues.Count()); + + CreateIssueReport( + issues, + ConsoleIssueReportFormat(), + @".", + string.Empty); +}); + +Task("Default") + .IsDependentOn("Print-Issues-Default"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/generate-grouped.cake b/docs/input/assets/scripts/console-examples/generate-grouped.cake new file mode 100644 index 000000000..374cc2d9e --- /dev/null +++ b/docs/input/assets/scripts/console-examples/generate-grouped.cake @@ -0,0 +1,41 @@ +#addin "Cake.Issues&prerelease" +#addin "Cake.Issues.Reporting&prerelease" +#addin "Cake.Issues.Reporting.Console&prerelease" + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Print-Issues-Grouped") + .Does(() => +{ + Information("Running Console Report with Grouped by Rule"); + + var issues = DeserializeIssuesFromJsonFile("sample-issues.json"); + Information("Read {0} issues", issues.Count()); + + CreateIssueReport( + issues, + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + GroupByRule = true + }), + @".", + string.Empty); +}); + +Task("Default") + .IsDependentOn("Print-Issues-Grouped"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/generate-summaries.cake b/docs/input/assets/scripts/console-examples/generate-summaries.cake new file mode 100644 index 000000000..be81ee68f --- /dev/null +++ b/docs/input/assets/scripts/console-examples/generate-summaries.cake @@ -0,0 +1,42 @@ +#addin "Cake.Issues&prerelease" +#addin "Cake.Issues.Reporting&prerelease" +#addin "Cake.Issues.Reporting.Console&prerelease" + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Print-Issues-Summaries") + .Does(() => +{ + Information("Running Console Report with Provider and Priority Summaries"); + + var issues = DeserializeIssuesFromJsonFile("sample-issues.json"); + Information("Read {0} issues", issues.Count()); + + CreateIssueReport( + issues, + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + ShowProviderSummary = true, + ShowPrioritySummary = true + }), + @".", + string.Empty); +}); + +Task("Default") + .IsDependentOn("Print-Issues-Summaries"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/global.json b/docs/input/assets/scripts/console-examples/global.json new file mode 100644 index 000000000..7b7d0dc44 --- /dev/null +++ b/docs/input/assets/scripts/console-examples/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "8.0.413", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/nuget.config b/docs/input/assets/scripts/console-examples/nuget.config new file mode 100644 index 000000000..012f8b780 --- /dev/null +++ b/docs/input/assets/scripts/console-examples/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/run-examples.sh b/docs/input/assets/scripts/console-examples/run-examples.sh new file mode 100755 index 000000000..3a8170d0d --- /dev/null +++ b/docs/input/assets/scripts/console-examples/run-examples.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Default settings example +echo "=== Running Default Console Report Example ===" +dotnet tool restore && dotnet tool run dotnet-cake generate-default.cake --verbosity=minimal + +echo "" +echo "=== Running Grouped by Rule Example ===" +dotnet tool restore && dotnet tool run dotnet-cake generate-grouped.cake --verbosity=minimal + +echo "" +echo "=== Running Summaries Example ===" +dotnet tool restore && dotnet tool run dotnet-cake generate-summaries.cake --verbosity=minimal + +echo "" +echo "=== Running Combined Features Example ===" +dotnet tool restore && dotnet tool run dotnet-cake generate-combined.cake --verbosity=minimal \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/sample-issues.json b/docs/input/assets/scripts/console-examples/sample-issues.json new file mode 100644 index 000000000..f90d3b042 --- /dev/null +++ b/docs/input/assets/scripts/console-examples/sample-issues.json @@ -0,0 +1,698 @@ +[ + { + "Version": 5, + "Identifier": "The file header is missing or not located at the top of the file.", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 1, + "EndLine": null, + "Column": 1, + "EndColumn": null, + "FileLink": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md", + "MessageText": "The file header is missing or not located at the top of the file.", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "SA1633", + "RuleName": null, + "RuleUrl": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive should appear within a namespace declaration", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 1, + "EndLine": null, + "Column": 1, + "EndColumn": null, + "FileLink": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "MessageText": "Using directive should appear within a namespace declaration", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "SA1200", + "RuleName": null, + "RuleUrl": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive should appear within a namespace declaration", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 2, + "EndLine": null, + "Column": 1, + "EndColumn": null, + "FileLink": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "MessageText": "Using directive should appear within a namespace declaration", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "SA1200", + "RuleName": null, + "RuleUrl": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive should appear within a namespace declaration", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 3, + "EndLine": null, + "Column": 1, + "EndColumn": null, + "FileLink": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "MessageText": "Using directive should appear within a namespace declaration", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "SA1200", + "RuleName": null, + "RuleUrl": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive should appear within a namespace declaration", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 4, + "EndLine": null, + "Column": 1, + "EndColumn": null, + "FileLink": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "MessageText": "Using directive should appear within a namespace declaration", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "SA1200", + "RuleName": null, + "RuleUrl": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive should appear within a namespace declaration", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 5, + "EndLine": null, + "Column": 1, + "EndColumn": null, + "FileLink": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "MessageText": "Using directive should appear within a namespace declaration", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "SA1200", + "RuleName": null, + "RuleUrl": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Member 'Foo' does not access instance data and can be marked as static", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 11, + "EndLine": null, + "Column": 21, + "EndColumn": null, + "FileLink": "https://www.google.com/search?q=\"CA1822:\"+site:learn.microsoft.com", + "MessageText": "Member 'Foo' does not access instance data and can be marked as static", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "CA1822", + "RuleName": null, + "RuleUrl": "https://www.google.com/search?q=\"CA1822:\"+site:learn.microsoft.com", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Member 'Bar' does not access instance data and can be marked as static", + "ProjectFileRelativePath": "src/ClassLibrary1/ClassLibrary1.csproj", + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 21, + "EndLine": null, + "Column": 21, + "EndColumn": null, + "FileLink": "https://www.google.com/search?q=\"CA1822:\"+site:learn.microsoft.com", + "MessageText": "Member 'Bar' does not access instance data and can be marked as static", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "CA1822", + "RuleName": null, + "RuleUrl": "https://www.google.com/search?q=\"CA1822:\"+site:learn.microsoft.com", + "ProviderType": "Cake.Issues.MsBuild.MsBuildIssuesProvider", + "ProviderName": "MSBuild", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Possible duplicate detected (cost 76)", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 12, + "EndLine": 19, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L12-L19", + "MessageText": "Possible duplicate detected (cost 76).\r\nThe following fragments were found that might be duplicates:\r\n\"src\\ClassLibrary1\\Class1.cs\" (Line 22 to 29)", + "MessageMarkdown": "Possible duplicate detected (cost 76).\r\nThe following fragments were found that might be duplicates:\r\n[src\\ClassLibrary1\\Class1.cs](https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L22-L29) (Line 22 to 29)", + "MessageHtml": "Possible duplicate detected (cost 76).
The following fragments were found that might be duplicates:
src\\ClassLibrary1\\Class1.cs (Line 22 to 29)", + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "dupFinder", + "RuleName": null, + "RuleUrl": null, + "ProviderType": "Cake.Issues.DupFinder.DupFinderIssuesProvider", + "ProviderName": "DupFinder", + "Run": null, + "AdditionalInformation": {"cost": "76"} + }, + { + "Version": 5, + "Identifier": "Possible duplicate detected (cost 76)", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 22, + "EndLine": 29, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L22-L29", + "MessageText": "Possible duplicate detected (cost 76).\r\nThe following fragments were found that might be duplicates:\r\n\"src\\ClassLibrary1\\Class1.cs\" (Line 12 to 19)", + "MessageMarkdown": "Possible duplicate detected (cost 76).\r\nThe following fragments were found that might be duplicates:\r\n[src\\ClassLibrary1\\Class1.cs](https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L12-L19) (Line 12 to 19)", + "MessageHtml": "Possible duplicate detected (cost 76).
The following fragments were found that might be duplicates:
src\\ClassLibrary1\\Class1.cs (Line 12 to 19)", + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "dupFinder", + "RuleName": null, + "RuleUrl": null, + "ProviderType": "Cake.Issues.DupFinder.DupFinderIssuesProvider", + "ProviderName": "DupFinder", + "Run": null, + "AdditionalInformation": {"cost": "76"} + }, + { + "Version": 5, + "Identifier": "Using directive is not required by the code and can be safely removed", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 1, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L1", + "MessageText": "Using directive is not required by the code and can be safely removed", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "RedundantUsingDirective", + "RuleName": "Redundant using directive", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=RedundantUsingDirective", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive is not required by the code and can be safely removed", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 2, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L2", + "MessageText": "Using directive is not required by the code and can be safely removed", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "RedundantUsingDirective", + "RuleName": "Redundant using directive", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=RedundantUsingDirective", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive is not required by the code and can be safely removed", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 3, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L3", + "MessageText": "Using directive is not required by the code and can be safely removed", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "RedundantUsingDirective", + "RuleName": "Redundant using directive", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=RedundantUsingDirective", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive is not required by the code and can be safely removed", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 4, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L4", + "MessageText": "Using directive is not required by the code and can be safely removed", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "RedundantUsingDirective", + "RuleName": "Redundant using directive", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=RedundantUsingDirective", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Using directive is not required by the code and can be safely removed", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 5, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L5", + "MessageText": "Using directive is not required by the code and can be safely removed", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "RedundantUsingDirective", + "RuleName": "Redundant using directive", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=RedundantUsingDirective", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Class 'Class1' is never used", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 9, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L9", + "MessageText": "Class 'Class1' is never used", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 200, + "PriorityName": "Suggestion", + "RuleId": "UnusedType.Global", + "RuleName": "Type is never used: Non-private accessibility", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=UnusedType.Global", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Method 'Foo' is never used", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 11, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L11", + "MessageText": "Method 'Foo' is never used", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 200, + "PriorityName": "Suggestion", + "RuleId": "UnusedMember.Global", + "RuleName": "Type member is never used: Non-private accessibility", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=UnusedMember.Global", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Local variable 'foobar' is never used", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 17, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L17", + "MessageText": "Local variable 'foobar' is never used", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "UnusedVariable", + "RuleName": "Unused local variable", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=UnusedVariable", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Method 'Bar' is never used", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 21, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L21", + "MessageText": "Method 'Bar' is never used", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 200, + "PriorityName": "Suggestion", + "RuleId": "UnusedMember.Global", + "RuleName": "Type member is never used: Non-private accessibility", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=UnusedMember.Global", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Local variable 'foobar' is never used", + "ProjectFileRelativePath": null, + "ProjectName": "ClassLibrary1", + "AffectedFileRelativePath": "src/ClassLibrary1/Class1.cs", + "Line": 27, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/src/ClassLibrary1/Class1.cs#L27", + "MessageText": "Local variable 'foobar' is never used", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "UnusedVariable", + "RuleName": "Unused local variable", + "RuleUrl": "https://www.jetbrains.com/resharperplatform/help?Keyword=UnusedVariable", + "ProviderType": "Cake.Issues.InspectCode.InspectCodeIssuesProvider", + "ProviderName": "InspectCode", + "Run": null, + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: \"# foo\"]", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 1, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L1", + "MessageText": "Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: \"# foo\"]", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD022", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Trailing spaces [Expected: 0 or 2; Actual: 1]", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 2, + "EndLine": null, + "Column": 811, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L2", + "MessageText": "Trailing spaces [Expected: 0 or 2; Actual: 1]", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD009", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Line length [Expected: 100; Actual: 811]", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 2, + "EndLine": null, + "Column": 101, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L2", + "MessageText": "Line length [Expected: 100; Actual: 811]", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD013", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: \"# bar\"]", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 4, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L4", + "MessageText": "Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: \"# bar\"]", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD022", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Multiple top-level headings in the same document [Context: \"# bar\"]", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 4, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L4", + "MessageText": "Multiple top-level headings in the same document [Context: \"# bar\"]", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD025", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Fenced code blocks should be surrounded by blank lines [Context: \"```\"]", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 5, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L5", + "MessageText": "Fenced code blocks should be surrounded by blank lines [Context: \"```\"]", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD031", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Fenced code blocks should have a language specified [Context: \"```\"]", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 5, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L5", + "MessageText": "Fenced code blocks should have a language specified [Context: \"```\"]", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD040", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md040", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Files should end with a single newline character", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "docs/index.md", + "Line": 7, + "EndLine": null, + "Column": 3, + "EndColumn": null, + "FileLink": "https://github.com/cake-contrib/Cake.Issues/blob/develop/docs/index.md#L7", + "MessageText": "Files should end with a single newline character", + "MessageMarkdown": null, + "MessageHtml": null, + "Priority": 300, + "PriorityName": "Warning", + "RuleId": "MD047", + "RuleName": null, + "RuleUrl": "https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md047", + "ProviderType": "Cake.Issues.Markdownlint.MarkdownlintIssuesProvider", + "ProviderName": "markdownlint", + "Run": "Demos documentation", + "AdditionalInformation": {} + }, + { + "Version": 5, + "Identifier": "Something went wrong", + "ProjectFileRelativePath": null, + "ProjectName": null, + "AffectedFileRelativePath": "myfile.txt", + "Line": 42, + "EndLine": null, + "Column": null, + "EndColumn": null, + "FileLink": null, + "MessageText": "Something went wrong", + "MessageMarkdown": "Something went **wrong**", + "MessageHtml": "Something went wrong", + "Priority": 300, + "PriorityName": "Warning", + "RuleId": null, + "RuleName": null, + "RuleUrl": null, + "ProviderType": "MyCakeScript", + "ProviderName": "My Cake Script", + "Run": null, + "AdditionalInformation": {} + } +] \ No newline at end of file diff --git a/tests/Cake.Issues.Reporting.Console/script-runner/temp.cake b/tests/Cake.Issues.Reporting.Console/script-runner/temp.cake new file mode 100644 index 000000000..3367b0a96 --- /dev/null +++ b/tests/Cake.Issues.Reporting.Console/script-runner/temp.cake @@ -0,0 +1,39 @@ +#addin "Cake.Issues&prerelease" +#addin "Cake.Issues.Reporting&prerelease" +#addin "Cake.Issues.Reporting.Console&prerelease" + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Print-Issues") + .Does(() => +{ + var issues = DeserializeIssuesFromJsonFile(@"../../issues.json"); + Information("Read {0} issues", issues.Count()); + CreateIssueReport( + issues, + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + GroupByRule = true, + + }), + @".", + string.Empty); +}); + +Task("Default") + .IsDependentOn("Print-Issues"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file From abf96a5750387495ff5011139f7d0572354b81c5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 20:37:48 +0000 Subject: [PATCH 5/6] Improve Console report format documentation with examples, screenshots, and regeneration scripts Co-authored-by: pascalberger <2190718+pascalberger@users.noreply.github.com> --- .../script-runner/temp.cake | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 tests/Cake.Issues.Reporting.Console/script-runner/temp.cake diff --git a/tests/Cake.Issues.Reporting.Console/script-runner/temp.cake b/tests/Cake.Issues.Reporting.Console/script-runner/temp.cake deleted file mode 100644 index 3367b0a96..000000000 --- a/tests/Cake.Issues.Reporting.Console/script-runner/temp.cake +++ /dev/null @@ -1,39 +0,0 @@ -#addin "Cake.Issues&prerelease" -#addin "Cake.Issues.Reporting&prerelease" -#addin "Cake.Issues.Reporting.Console&prerelease" - -////////////////////////////////////////////////// -// ARGUMENTS -////////////////////////////////////////////////// - -var target = Argument("target", "Default"); - -////////////////////////////////////////////////// -// TARGETS -////////////////////////////////////////////////// - -Task("Print-Issues") - .Does(() => -{ - var issues = DeserializeIssuesFromJsonFile(@"../../issues.json"); - Information("Read {0} issues", issues.Count()); - CreateIssueReport( - issues, - ConsoleIssueReportFormat( - new ConsoleIssueReportFormatSettings - { - GroupByRule = true, - - }), - @".", - string.Empty); -}); - -Task("Default") - .IsDependentOn("Print-Issues"); - -////////////////////////////////////////////////// -// EXECUTION -////////////////////////////////////////////////// - -RunTarget(target); \ No newline at end of file From 2ade8af1bf82a7565f43c0f332ef07fa528b5e5d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:07:10 +0000 Subject: [PATCH 6/6] Add screenshot generation scripts and update console example documentation Co-authored-by: pascalberger <2190718+pascalberger@users.noreply.github.com> --- .../console-examples/console-combined.png | 4 +- .../console-examples/console-default.png | 4 +- .../console-examples/console-grouped.png | 4 +- .../console-examples/console-summaries.png | 4 +- .../scripts/console-examples/.gitignore | 7 +- .../assets/scripts/console-examples/README.md | 101 +++++++++++++++--- .../console-examples/generate-default.cake | 6 +- .../console-examples/generate-screenshot.sh | 86 +++++++++++++++ .../scripts/console-examples/run-examples.sh | 41 +++++-- 9 files changed, 220 insertions(+), 37 deletions(-) create mode 100755 docs/input/assets/scripts/console-examples/generate-screenshot.sh diff --git a/docs/input/assets/images/console-examples/console-combined.png b/docs/input/assets/images/console-examples/console-combined.png index db3478b4b..4e7be0101 100644 --- a/docs/input/assets/images/console-examples/console-combined.png +++ b/docs/input/assets/images/console-examples/console-combined.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44a14ffbc7ba546a335d64d8e8acba22db5d7beaa1285ce891bdacdd15adc29c -size 80331 +oid sha256:96de18c04e9dd03e492809664d19f10cc485cd98ba419b50a158fa65f1fcea5a +size 12260277 diff --git a/docs/input/assets/images/console-examples/console-default.png b/docs/input/assets/images/console-examples/console-default.png index 0c3166205..c3e46acd3 100644 --- a/docs/input/assets/images/console-examples/console-default.png +++ b/docs/input/assets/images/console-examples/console-default.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e238bcca03e225131b7aee59fb1901ed6a81afeb93ecd09220e81b3d58ee2d9b -size 42819 +oid sha256:14096221fc2ac0d5275e0d0e3f7e4b1d1c7a742573fefcb6e444c5fba40d0bee +size 12260277 diff --git a/docs/input/assets/images/console-examples/console-grouped.png b/docs/input/assets/images/console-examples/console-grouped.png index 250665818..404e66625 100644 --- a/docs/input/assets/images/console-examples/console-grouped.png +++ b/docs/input/assets/images/console-examples/console-grouped.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b230cb2749f6e9c84f90c9ada0af84b5e6204a44a0aa0f82c21b39f59965b44 -size 65960 +oid sha256:719cdcd336e962af7e01d2441d52330353ddd854aef72708c2737847821c26f4 +size 12260277 diff --git a/docs/input/assets/images/console-examples/console-summaries.png b/docs/input/assets/images/console-examples/console-summaries.png index de8b8f7f9..afb5a1c65 100644 --- a/docs/input/assets/images/console-examples/console-summaries.png +++ b/docs/input/assets/images/console-examples/console-summaries.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c1c2f1c6c62ca7acc043aacdfe34da180c794a84bab4697563a645c3baf443e -size 72825 +oid sha256:f2a8d0d62f51a97e4718a977211660fea7eb1d651a2e355b841527fec435a9f8 +size 12260277 diff --git a/docs/input/assets/scripts/console-examples/.gitignore b/docs/input/assets/scripts/console-examples/.gitignore index 8aee3d2b0..3fdffdc99 100644 --- a/docs/input/assets/scripts/console-examples/.gitignore +++ b/docs/input/assets/scripts/console-examples/.gitignore @@ -11,4 +11,9 @@ obj/ packages/ # Cake Build -.cake/ \ No newline at end of file +.cake/ + +# Sample files for testing (not part of the real project structure) +src/ +docs/ +myfile.txt \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/README.md b/docs/input/assets/scripts/console-examples/README.md index 0b6957999..932fcbf84 100644 --- a/docs/input/assets/scripts/console-examples/README.md +++ b/docs/input/assets/scripts/console-examples/README.md @@ -11,39 +11,88 @@ These scripts allow reproducing the console output examples to: ## Scripts -- `generate-default.cake` - Default console output settings +- `generate-default.cake` - Default console output settings with individual diagnostics - `generate-grouped.cake` - Console output grouped by rule - `generate-summaries.cake` - Console output with provider and priority summaries - `generate-combined.cake` - Console output with all features enabled - `sample-issues.json` - Sample issues data used by all scripts +- `generate-screenshot.sh` - Helper script to generate PNG screenshots from console output +- `run-examples.sh` - Script to generate all screenshots at once -## Usage +## Prerequisites -To regenerate the console output for screenshots: +Before running the scripts, ensure you have: -1. Ensure the latest Cake.Issues packages are built: +1. **Built the NuGet packages** (required for the scripts to work): ```bash cd /path/to/Cake.Issues ./build.sh --target=Create-NuGet-Packages ``` -2. Run any of the example scripts: - ```bash - cd docs/input/assets/scripts/console-examples - dotnet tool restore - dotnet tool run dotnet-cake generate-default.cake --verbosity=minimal - ``` - - Or run all examples at once: +2. **Required tools installed**: + - `dotnet` (for running Cake scripts) + - `ansi2html` (for converting ANSI terminal output to HTML) + - `wkhtmltoimage` (for converting HTML to PNG images) + + Install the Python tools: ```bash - ./run-examples.sh + pip install ansi2html + sudo apt install wkhtmltopdf # includes wkhtmltoimage ``` -3. Capture the console output for documentation screenshots +## Usage -## Example Output +### Generate All Screenshots + +To regenerate all console output screenshots at once: + +```bash +cd docs/input/assets/scripts/console-examples +./run-examples.sh +``` + +This will generate all four PNG files in `docs/input/assets/images/console-examples/`: +- `console-default.png` +- `console-grouped.png` +- `console-summaries.png` +- `console-combined.png` + +### Generate Individual Screenshots + +To generate a specific screenshot: + +```bash +cd docs/input/assets/scripts/console-examples +./generate-screenshot.sh +``` + +Examples: +```bash +./generate-screenshot.sh generate-default.cake console-default.png +./generate-screenshot.sh generate-grouped.cake console-grouped.png +./generate-screenshot.sh generate-summaries.cake console-summaries.png +./generate-screenshot.sh generate-combined.cake console-combined.png +``` -To see the individual issue details, run with normal verbosity. To see just the summaries (as shown in the screenshots), use `--verbosity=minimal`. +### Run Scripts Without Screenshots + +To just run the examples and see the console output without generating images: + +```bash +cd docs/input/assets/scripts/console-examples +dotnet tool restore +dotnet tool run dotnet-cake generate-default.cake --settings_skippackageversioncheck=true +``` + +## Screenshot Generation Process + +The screenshot generation works as follows: + +1. **Run Cake script** - Execute the console report script and capture all output including ANSI color codes +2. **Convert ANSI to HTML** - Use `ansi2html` to convert terminal colors to HTML with CSS +3. **Style HTML** - Apply additional CSS styling for a clean terminal appearance +4. **Generate PNG** - Use `wkhtmltoimage` to convert the styled HTML to a PNG image +5. **Save to docs** - Place the generated PNG in the documentation assets directory ## Sample Data @@ -54,4 +103,22 @@ The `sample-issues.json` file contains realistic issue data representing: - markdownlint documentation issues - Custom script issues -This data produces output similar to what users would see in real projects. \ No newline at end of file +Supporting files (`src/ClassLibrary1/Class1.cs`, `docs/index.md`, `myfile.txt`) are included to ensure the issues reference existing files, which is required for the console diagnostics to display properly. + +## Example Output + +The scripts demonstrate four distinct console output modes: + +### 1. Default Settings +Shows individual diagnostics for each issue with detailed file context and syntax highlighting. + +### 2. Grouped by Rule (`GroupByRule: true`) +Groups issues with the same rule ID together, reducing redundancy and improving readability when multiple instances of the same issue exist. + +### 3. With Summary Tables (`ShowProviderSummary: true`, `ShowPrioritySummary: true`) +Includes visual bar charts and detailed tables showing issue counts by provider and priority levels. + +### 4. Combined Features +Demonstrates the most comprehensive output combining grouped diagnostics with summary tables. + +This produces output similar to what users would see in real projects, helping them choose the right console report configuration for their needs. \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/generate-default.cake b/docs/input/assets/scripts/console-examples/generate-default.cake index 4007ebde7..a9644d53e 100644 --- a/docs/input/assets/scripts/console-examples/generate-default.cake +++ b/docs/input/assets/scripts/console-examples/generate-default.cake @@ -22,7 +22,11 @@ Task("Print-Issues-Default") CreateIssueReport( issues, - ConsoleIssueReportFormat(), + ConsoleIssueReportFormat( + new ConsoleIssueReportFormatSettings + { + ShowDiagnostics = true + }), @".", string.Empty); }); diff --git a/docs/input/assets/scripts/console-examples/generate-screenshot.sh b/docs/input/assets/scripts/console-examples/generate-screenshot.sh new file mode 100755 index 000000000..3f69249da --- /dev/null +++ b/docs/input/assets/scripts/console-examples/generate-screenshot.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +# Script to generate console output and convert to PNG image +# Usage: generate-screenshot.sh + +set -e + +SCRIPT_NAME="$1" +IMAGE_NAME="$2" +DOCS_IMAGE_DIR="../../images/console-examples" + +if [ -z "$SCRIPT_NAME" ] || [ -z "$IMAGE_NAME" ]; then + echo "Usage: $0 " + echo "Example: $0 generate-default.cake console-default.png" + exit 1 +fi + +echo "Generating console output for $SCRIPT_NAME..." + +# Create temp directory for output +TEMP_DIR=$(mktemp -d) +trap "rm -rf $TEMP_DIR" EXIT + +# Generate console output with ANSI colors +script -q -c "dotnet tool run dotnet-cake $SCRIPT_NAME --settings_skippackageversioncheck=true 2>&1" "$TEMP_DIR/console-output.txt" + +# Convert ANSI to HTML +ansi2html --scheme dracula < "$TEMP_DIR/console-output.txt" > "$TEMP_DIR/console-output.html" + +# Add custom CSS for better terminal appearance +cat > "$TEMP_DIR/styled-console.html" << 'EOF' + + + + + + + +
+EOF
+
+# Extract the content between first and last "Script" lines and add to styled HTML
+sed -n '/Script started/,/Script done/p' "$TEMP_DIR/console-output.html" | \
+    sed '1d;$d' | \
+    sed 's/^[^>]*>//g' >> "$TEMP_DIR/styled-console.html"
+
+cat >> "$TEMP_DIR/styled-console.html" << 'EOF'
+
+ + +EOF + +# Ensure docs image directory exists +mkdir -p "$DOCS_IMAGE_DIR" + +# Convert HTML to PNG with specific dimensions and styling +wkhtmltoimage \ + --width 1200 \ + --height 800 \ + --quality 100 \ + --format png \ + --javascript-delay 1000 \ + --no-stop-slow-scripts \ + --enable-local-file-access \ + "$TEMP_DIR/styled-console.html" \ + "$DOCS_IMAGE_DIR/$IMAGE_NAME" + +echo "Screenshot saved to: $DOCS_IMAGE_DIR/$IMAGE_NAME" \ No newline at end of file diff --git a/docs/input/assets/scripts/console-examples/run-examples.sh b/docs/input/assets/scripts/console-examples/run-examples.sh index 3a8170d0d..438cc7ba6 100755 --- a/docs/input/assets/scripts/console-examples/run-examples.sh +++ b/docs/input/assets/scripts/console-examples/run-examples.sh @@ -1,17 +1,38 @@ #!/usr/bin/env bash -# Default settings example -echo "=== Running Default Console Report Example ===" -dotnet tool restore && dotnet tool run dotnet-cake generate-default.cake --verbosity=minimal +# Script to run all console example scripts and generate screenshots -echo "" -echo "=== Running Grouped by Rule Example ===" -dotnet tool restore && dotnet tool run dotnet-cake generate-grouped.cake --verbosity=minimal +set -e + +echo "Generating all console example screenshots..." + +# Ensure we have the required tools +command -v dotnet >/dev/null 2>&1 || { echo "dotnet is required but not installed. Aborting." >&2; exit 1; } +command -v ansi2html >/dev/null 2>&1 || { echo "ansi2html is required but not installed. Aborting." >&2; exit 1; } +command -v wkhtmltoimage >/dev/null 2>&1 || { echo "wkhtmltoimage is required but not installed. Aborting." >&2; exit 1; } + +# Restore dotnet tools +echo "Restoring dotnet tools..." +dotnet tool restore + +# Generate all screenshots +echo "Generating default screenshot..." +./generate-screenshot.sh generate-default.cake console-default.png +echo "Generating grouped screenshot..." +./generate-screenshot.sh generate-grouped.cake console-grouped.png + +echo "Generating summaries screenshot..." +./generate-screenshot.sh generate-summaries.cake console-summaries.png + +echo "Generating combined screenshot..." +./generate-screenshot.sh generate-combined.cake console-combined.png + +echo "" +echo "All screenshots have been generated successfully!" echo "" -echo "=== Running Summaries Example ===" -dotnet tool restore && dotnet tool run dotnet-cake generate-summaries.cake --verbosity=minimal +echo "Generated files:" +ls -la ../../images/console-examples/*.png echo "" -echo "=== Running Combined Features Example ===" -dotnet tool restore && dotnet tool run dotnet-cake generate-combined.cake --verbosity=minimal \ No newline at end of file +echo "Screenshots are ready for use in the documentation." \ No newline at end of file