Skip to content

Commit 08548d6

Browse files
Rename "Results" to "Issues" in markdown reports (#37)
* Initial plan * Rename Results to Issues in markdown reports Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * Update documentation to use Issues terminology Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * Rename AppendResultsSection to AppendIssuesSection Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * Fix self-validation to check for Issues instead of Results Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
1 parent cb5e33f commit 08548d6

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ The generated markdown report includes:
153153

154154
1. **Report Header** - Custom heading or tool name with "Analysis" suffix
155155
2. **Tool Information** - Tool name and version extracted from SARIF file
156-
3. **Results Summary** - Count of issues found in the analysis
157-
4. **Results List** - Detailed list of results in compiler-style format with file, line, level, rule ID, and message
156+
3. **Issues Summary** - Count of issues found in the analysis
157+
4. **Issues List** - Detailed list of issues in compiler-style format with file, line, level, rule ID, and message
158158

159159
Example report structure:
160160

@@ -163,9 +163,9 @@ Example report structure:
163163

164164
**Tool:** MockTool 1.0.0
165165

166-
## Results
166+
## Issues
167167

168-
Found 2 results
168+
Found 2 issues
169169

170170
src/Program.cs(42): warning [TEST001] Test issue 1
171171
src/Helper.cs(15): error [TEST002] Test issue 2

docs/guide/guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Fail the build if any issues are found:
154154
sarifmark --sarif analysis.sarif --report report.md --enforce
155155
```
156156

157-
The command will exit with a non-zero exit code if the SARIF file contains any results.
157+
The command will exit with a non-zero exit code if the SARIF file contains any issues.
158158

159159
### Run Self-Validation
160160

@@ -213,8 +213,8 @@ sarifmark --sarif other-tool.sarif --report other-report.md --heading "Other Too
213213
The generated markdown reports include:
214214

215215
- **Tool Information**: Name and version of the analysis tool
216-
- **Summary**: Count of results found
217-
- **Results Details**: Detailed information about each finding, including:
216+
- **Summary**: Count of issues found
217+
- **Issues Details**: Detailed information about each finding, including:
218218
- File location and line number
219219
- Severity level
220220
- Rule ID

src/DemaConsulting.SarifMark/SarifResults.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ public string ToMarkdown(int depth, string? heading = null)
354354
var sb = new StringBuilder();
355355

356356
AppendHeader(sb, mainHeading, heading);
357-
AppendResultsSection(sb, subHeading);
357+
AppendIssuesSection(sb, subHeading);
358358

359359
return sb.ToString();
360360
}
@@ -378,14 +378,14 @@ private void AppendHeader(StringBuilder sb, string heading, string? customHeadin
378378
}
379379

380380
/// <summary>
381-
/// Appends the results section with count and details.
381+
/// Appends the issues section with count and details.
382382
/// </summary>
383-
private void AppendResultsSection(StringBuilder sb, string subHeading)
383+
private void AppendIssuesSection(StringBuilder sb, string subHeading)
384384
{
385-
sb.AppendLine($"{subHeading} Results");
385+
sb.AppendLine($"{subHeading} Issues");
386386
sb.AppendLine();
387387

388-
sb.AppendLine(FormatFoundText(Results.Count, "result"));
388+
sb.AppendLine(FormatFoundText(Results.Count, "issue"));
389389
sb.AppendLine();
390390

391391
if (Results.Count > 0)
@@ -405,7 +405,7 @@ private void AppendResultsSection(StringBuilder sb, string subHeading)
405405
/// </summary>
406406
/// <param name="count">The count value.</param>
407407
/// <param name="singularNoun">The singular form of the noun.</param>
408-
/// <returns>Formatted text like "Found no results", "Found 1 result", or "Found 5 results".</returns>
408+
/// <returns>Formatted text like "Found no issues", "Found 1 issue", or "Found 5 issues".</returns>
409409
private static string FormatFoundText(int count, string singularNoun)
410410
{
411411
return count switch

src/DemaConsulting.SarifMark/Validation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private static void RunMarkdownReportGenerationTest(Context context, DemaConsult
137137
}
138138

139139
if (reportContent.Contains("MockTool Analysis") &&
140-
reportContent.Contains("Found 2 results"))
140+
reportContent.Contains("Found 2 issues"))
141141
{
142142
return null;
143143
}

test/DemaConsulting.SarifMark.Tests/SarifResultsTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ public void SarifResults_ToMarkdown_Depth1_ProducesCorrectOutput()
681681
Assert.IsNotNull(markdown);
682682
Assert.Contains("# TestTool Analysis", markdown);
683683
Assert.Contains("**Tool:** TestTool 1.0.0", markdown);
684-
Assert.Contains("## Results", markdown);
685-
Assert.Contains("Found 2 results", markdown);
684+
Assert.Contains("## Issues", markdown);
685+
Assert.Contains("Found 2 issues", markdown);
686686
Assert.Contains("src/MyClass.cs(42): warning [CA1001] Types that own disposable fields should be disposable", markdown);
687687
Assert.Contains("src/Program.cs(15): error [CA2000] Dispose objects before losing scope", markdown);
688688
}
@@ -702,7 +702,7 @@ public void SarifResults_ToMarkdown_Depth3_UsesCorrectHeadingLevels()
702702
// Assert
703703
Assert.Contains("### TestTool Analysis", markdown);
704704
Assert.Contains("**Tool:** TestTool 1.0.0", markdown);
705-
Assert.Contains("#### Results", markdown);
705+
Assert.Contains("#### Issues", markdown);
706706
}
707707

708708
/// <summary>
@@ -718,7 +718,7 @@ public void SarifResults_ToMarkdown_NoResults_ShowsFoundNoResults()
718718
var markdown = results.ToMarkdown(1);
719719

720720
// Assert
721-
Assert.Contains("Found no results", markdown);
721+
Assert.Contains("Found no issues", markdown);
722722
}
723723

724724
/// <summary>
@@ -739,8 +739,8 @@ public void SarifResults_ToMarkdown_OneResult_UsesSingularForm()
739739
var markdown = results.ToMarkdown(1);
740740

741741
// Assert
742-
Assert.Contains("Found 1 result", markdown);
743-
Assert.DoesNotContain("Found 1 results", markdown);
742+
Assert.Contains("Found 1 issue", markdown);
743+
Assert.DoesNotContain("Found 1 issues", markdown);
744744
}
745745

746746
/// <summary>
@@ -786,7 +786,7 @@ public void SarifResults_ToMarkdown_Depth6_ProducesCorrectOutput()
786786
// Assert
787787
Assert.Contains("###### TestTool Analysis", markdown);
788788
Assert.Contains("**Tool:** TestTool 1.0.0", markdown);
789-
Assert.Contains("###### Results", markdown); // Capped at 6
789+
Assert.Contains("###### Issues", markdown); // Capped at 6
790790
}
791791

792792
/// <summary>

0 commit comments

Comments
 (0)