Skip to content

Commit 0fd77f4

Browse files
authored
Update for InspectCode default format change (#949)
1 parent 4562bfd commit 0fd77f4

File tree

3 files changed

+32
-9
lines changed

3 files changed

+32
-9
lines changed

docs/input/documentation/issue-providers/inspectcode/examples.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ and write a log file and a task to read issues from the log file and write the n
4747

4848
Task("Analyze-Project").Does(() =>
4949
{
50-
// Run InspectCode.
50+
// Run InspectCode and enforce XML output.
5151
var settings = new InspectCodeSettings() {
52-
OutputFile = logPath
52+
OutputFile = logPath,
53+
ArgumentCustomization = x => x.Append("-f=xml")
5354
};
5455

5556
InspectCode(repoRootPath.CombineWithFilePath("MySolution.sln"), settings);
@@ -103,9 +104,10 @@ and write a log file and a task to read issues from the log file and write the n
103104
{
104105
public override void Run(BuildContext context)
105106
{
106-
// Run InspectCode.
107+
// Run InspectCode and enforce XML output.
107108
var settings = new InspectCodeSettings() {
108-
OutputFile = context.LogPath
109+
OutputFile = context.LogPath,
110+
ArgumentCustomization = x => x.Append("-f=xml")
109111
};
110112
111113
context.InspectCode(

docs/input/documentation/issue-providers/inspectcode/features.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ icon: material/creation-outline
77
The [Cake.Issues.InspectCode addin]{target="_blank"} provides the following features.
88

99
??? tip "Tip: Running InspectCode"
10-
[JetBrains InsepectCode]{target="_blank"} can be run using the [InspectCode alias]{target="_blank"}.
10+
[JetBrains InspectCode]{target="_blank"} can be run using the [InspectCode alias]{target="_blank"}.
1111

1212
## Basic features
1313

14-
- [x] Reads warnings from [JetBrains InsepectCode]{target="_blank"} log files.
14+
- [x] Reads warnings from [JetBrains InspectCode]{target="_blank"} XML log files.
1515
- [x] Provides URLs for issues containing a Wiki URL.
1616

17+
!!! note
18+
Starting from version 2024.1, the default output format of [JetBrains InspectCode] is Static Analysis Results Interchange Format (SARIF).
19+
The XML format, which was the default in previous versions, will soon be deprecated.
20+
Results in the XML format are still available with the `-f="xml"` parameter.
21+
22+
This issue provider is only for the deprecated XML format.
23+
For the new default SARIF format [Cake.Issues.Sarif] can be used.
24+
1725
## Supported IIssue properties
1826

1927
<div class="annotate" markdown>
@@ -44,6 +52,7 @@ The [Cake.Issues.InspectCode addin]{target="_blank"} provides the following feat
4452
2. Set to `IIssue.MessageText`
4553
3. Can be set while reading issues
4654

47-
[JetBrains InsepectCode]: https://www.jetbrains.com/help/resharper/InspectCode.html
55+
[JetBrains InspectCode]: https://www.jetbrains.com/help/resharper/InspectCode.html
4856
[Cake.Issues.InspectCode addin]: https://cakebuild.net/extensions/cake-issues-inspectcode/
4957
[InspectCode alias]: https://cakebuild.net/dsl/resharper/#InspectCode
58+
[Cake.Issues.Sarif]: ../sarif/index.md

docs/input/documentation/issue-providers/inspectcode/index.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@ title: InspectCode
33
description: Issue provider which allows you to read issues logged by JetBrains Inspect Code.
44
---
55

6-
Support for reading issues reported by [JetBrains Inspect Code](https://www.jetbrains.com/help/resharper/2017.1/InspectCode.html)
7-
is implemented in the [Cake.Issues.InspectCode addin](https://www.nuget.org/packages/Cake.Issues.InspectCode).
6+
Support for reading issues reported by [JetBrains InspectCode]{target="_blank"} in XML format
7+
is implemented in the [Cake.Issues.InspectCode addin]{target="_blank"}.
8+
9+
!!! note
10+
Starting from version 2024.1, the default output format of [JetBrains InspectCode] is Static Analysis Results Interchange Format (SARIF).
11+
The XML format, which was the default in previous versions, will soon be deprecated.
12+
Results in the XML format are still available with the `-f="xml"` parameter.
13+
14+
This issue provider is only for the deprecated XML format.
15+
For the new default SARIF format [Cake.Issues.Sarif] can be used.
816

917
<div class="grid cards" markdown>
1018

@@ -13,3 +21,7 @@ is implemented in the [Cake.Issues.InspectCode addin](https://www.nuget.org/pack
1321
- :material-api: [API](https://cakebuild.net/extensions/cake-issues-inspectcode){target="_blank"}
1422

1523
</div>
24+
25+
[JetBrains InspectCode]: https://www.jetbrains.com/help/resharper/InspectCode.html
26+
[Cake.Issues.InspectCode addin]: https://cakebuild.net/extensions/cake-issues-inspectcode/
27+
[Cake.Issues.Sarif]: ../sarif/index.md

0 commit comments

Comments
 (0)