Skip to content

Commit 732c493

Browse files
authored
Add TAP issue provider (#930)
1 parent fbe0b76 commit 732c493

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2520
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ For questions and to discuss ideas & feature requests, use the [GitHub discussio
123123
| [Cake.Issues.InspectCode](https://www.nuget.org/packages/Cake.Issues.InspectCode) | [Cake.Frosting.Issues.InspectCode](https://www.nuget.org/packages/Cake.Frosting.Issues.InspectCode) | Issue provider for reading JetBrains Inspect Code issues. |
124124
| [Cake.Issues.Markdownlint](https://www.nuget.org/packages/Cake.Issues.Markdownlint) | [Cake.Frosting.Issues.Markdownlint](https://www.nuget.org/packages/Cake.Frosting.Issues.Markdownlint) | Issue provider for reading issues from markdownlint. |
125125
| [Cake.Issues.Sarif](https://www.nuget.org/packages/Cake.Issues.Sarif) | [Cake.Frosting.Issues.Sarif](https://www.nuget.org/packages/Cake.Frosting.Issues.Sarif) | Issue provider for reading SARIF reports. |
126+
| [Cake.Issues.Tap](https://www.nuget.org/packages/Cake.Issues.Tap) | [Cake.Frosting.Issues.Tap](https://www.nuget.org/packages/Cake.Frosting.Issues.Tap) | Issue provider for reading files in Test Anything Protocol (TAP) format. |
126127
| [Cake.Issues.Terraform](https://www.nuget.org/packages/Cake.Issues.Terraform) | [Cake.Frosting.Issues.Terraform](https://www.nuget.org/packages/Cake.Frosting.Issues.Terraform) | Issue provider for reading Terraform validation output. |
127128
| [Cake.Issues.PullRequests](https://www.nuget.org/packages/Cake.Issues.PullRequests) | [Cake.Frosting.Issues.PullRequests](https://www.nuget.org/packages/Cake.Frosting.Issues.PullRequests) | Addin providing the aliases for writing issues to pull requests and build servers. |
128129
| [Cake.Issues.PullRequests.AppVeyor](https://www.nuget.org/packages/Cake.Issues.PullRequests.AppVeyor) | [Cake.Frosting.Issues.PullRequests.AppVeyor](https://www.nuget.org/packages/Cake.Frosting.Issues.PullRequests.AppVeyor) | Integration with AppVeyor builds. |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"Tool","Tool Version","Format","Issue Provider","Supported Since"
2+
"[stylelint](https://stylelint.io/){target='_blank'} :material-alert-decagram:",,"[tap](https://stylelint.io/user-guide/options/#formatter){target='_blank'}","[Cake.Issues.Tap](issue-providers/tap/index.md)",5.1.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"Tool","Tool Version","Format","Issue Provider","Supported Since"
22
"[checkov](https://www.checkov.io/){target='_blank'}",,"[SARIF](https://www.checkov.io/2.Basics/CLI%20Command%20Reference.html){target='_blank'}","[Cake.Issues.Sarif](issue-providers/sarif/index.md)",4.2.0
33
"[kics](https://kics.io/){target='_blank'}",,"[sarif](https://github.com/Checkmarx/kics/blob/master/docs/results.md#sarif){target='_blank'}","[Cake.Issues.Sarif](issue-providers/sarif/index.md)",4.2.0
4+
"[Kubeconform](https://github.com/yannh/kubeconform){target='_blank'} :material-alert-decagram:",,"[tap](https://github.com/yannh/kubeconform?tab=readme-ov-file#usage){target='_blank'}","[Cake.Issues.Tap](issue-providers/tap/index.md)",4.2.0
45
"[Trivy](https://trivy.dev/){target='_blank'}",,"[SARIF](https://trivy.dev/v0.58/docs/configuration/reporting/#sarif){target='_blank'}","[Cake.Issues.Sarif](issue-providers/sarif/index.md)",4.2.0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"Tool","Tool Version","Format","Issue Provider","Supported Since"
2+
"[textlint](https://textlint.github.io/){target='_blank'} :material-alert-decagram:",,"[tap](https://textlint.github.io/docs/cli.html#options){target='_blank'}","[Cake.Issues.Tap](issue-providers/tap/index.md)",5.1.0

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Issue provider addins are responsible for providing the output of an analyzer or
1414
- :material-layers-plus: __[Markdownlint]__ – Issue provider for reading issues from markdownlint
1515
- :material-layers-plus: __[MsBuild]__ – Issue provider for reading MsBuild errors and warnings
1616
- :material-layers-plus: __[Sarif]__ – Issue provider for reading SARIF reports
17+
- :material-layers-plus: __[Test Anything Protocol (TAP)]__ – Issue provider for reading TAP reports
1718
- :material-layers-plus: __[Terraform]__ – Issue provider for reading Terraform validation output
1819

1920
</div>
@@ -25,6 +26,7 @@ Issue provider addins are responsible for providing the output of an analyzer or
2526
[Markdownlint]: markdownlint/index.md
2627
[MsBuild]: msbuild/index.md
2728
[Sarif]: sarif/index.md
29+
[Test Anything Protocol (TAP)]: tap/index.md
2830
[Terraform]: terraform/index.md
2931

3032
!!! tip
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: Features
3+
description: Features of the Cake.Issues.Tap addin.
4+
icon: material/creation-outline
5+
---
6+
7+
The [Cake.Issues.Tap addin](https://cakebuild.net/extensions/cake-issues-tap/){target="_blank"} provides the following features.
8+
9+
## Basic features
10+
11+
- [x] Reads issues from files in [Test Anything Protocol (TAP)]{target="_blank"} format version 13 or 14.
12+
13+
## Supported log file formats
14+
15+
!!! note
16+
Details, like file, line / column or rule information, are not standardized in [Test Anything Protocol (TAP)]{target="_blank"}.
17+
The `GenericLogFileFormat` will therefore only return issues containing the description, which might be the file name for some tools.
18+
To retrieve detailed information a tool specific log file format needs to be used which can parse the non-standardized
19+
data provided by the tool for every issue.
20+
21+
- [x] `GenericLogFileFormat` alias for reading issues from any [Test Anything Protocol (TAP)]{target="_blank"} compatible file
22+
- [x] `StylelintLogFileFormat` alias for reading TAP files generated by [stylelint](https://stylelint.io/){target="_blank"}.
23+
- [x] `TextlintLogFileFormat` alias for reading TAP files generated by [Textlint](https://textlint.github.io/){target="_blank"}.
24+
25+
## Supported IIssue properties
26+
27+
=== "GenericLogFileFormat"
28+
29+
<div class="annotate" markdown>
30+
31+
- [x] `IIssue.ProviderType`
32+
- [x] `IIssue.ProviderName`
33+
- [ ] `IIssue.Run` (1)
34+
- [x] `IIssue.Identifier` (2)
35+
- [ ] `IIssue.ProjectName`
36+
- [ ] `IIssue.ProjectFileRelativePath`
37+
- [ ] `IIssue.AffectedFileRelativePath`
38+
- [ ] `IIssue.Line`
39+
- [ ] `IIssue.EndLine`
40+
- [ ] `IIssue.Column`
41+
- [ ] `IIssue.EndColumn`
42+
- [ ] `IIssue.FileLink` (3)
43+
- [x] `IIssue.MessageText`
44+
- [ ] `IIssue.MessageHtml`
45+
- [ ] `IIssue.MessageMarkdown`
46+
- [ ] `IIssue.Priority`
47+
- [ ] `IIssue.PriorityName`
48+
- [ ] `IIssue.RuleId`
49+
- [ ] `IIssue.RuleUrl`
50+
51+
</div>
52+
53+
1. Can be set while reading issues
54+
2. Set to `IIssue.MessageText`
55+
3. Can be set while reading issues
56+
57+
=== "StylelintLogFileFormat"
58+
59+
<div class="annotate" markdown>
60+
61+
- [x] `IIssue.ProviderType`
62+
- [x] `IIssue.ProviderName`
63+
- [ ] `IIssue.Run` (1)
64+
- [x] `IIssue.Identifier` (2)
65+
- [ ] `IIssue.ProjectName`
66+
- [ ] `IIssue.ProjectFileRelativePath`
67+
- [x] `IIssue.AffectedFileRelativePath`
68+
- [x] `IIssue.Line`
69+
- [x] `IIssue.EndLine`
70+
- [x] `IIssue.Column`
71+
- [x] `IIssue.EndColumn`
72+
- [ ] `IIssue.FileLink` (3)
73+
- [x] `IIssue.MessageText`
74+
- [ ] `IIssue.MessageHtml`
75+
- [ ] `IIssue.MessageMarkdown`
76+
- [x] `IIssue.Priority`
77+
- [x] `IIssue.PriorityName`
78+
- [x] `IIssue.RuleId`
79+
- [ ] `IIssue.RuleUrl`
80+
81+
</div>
82+
83+
1. Can be set while reading issues
84+
2. Set to `IIssue.MessageText`
85+
3. Can be set while reading issues
86+
87+
=== "TextlintLogFileFormat"
88+
89+
<div class="annotate" markdown>
90+
91+
- [x] `IIssue.ProviderType`
92+
- [x] `IIssue.ProviderName`
93+
- [ ] `IIssue.Run` (1)
94+
- [x] `IIssue.Identifier` (2)
95+
- [ ] `IIssue.ProjectName`
96+
- [ ] `IIssue.ProjectFileRelativePath`
97+
- [x] `IIssue.AffectedFileRelativePath`
98+
- [x] `IIssue.Line`
99+
- [ ] `IIssue.EndLine`
100+
- [x] `IIssue.Column`
101+
- [ ] `IIssue.EndColumn`
102+
- [ ] `IIssue.FileLink` (3)
103+
- [x] `IIssue.MessageText`
104+
- [ ] `IIssue.MessageHtml`
105+
- [ ] `IIssue.MessageMarkdown`
106+
- [x] `IIssue.Priority`
107+
- [x] `IIssue.PriorityName`
108+
- [x] `IIssue.RuleId`
109+
- [ ] `IIssue.RuleUrl`
110+
111+
</div>
112+
113+
1. Can be set while reading issues
114+
2. Set to `IIssue.MessageText`
115+
3. Can be set while reading issues
116+
117+
[Test Anything Protocol (TAP)]: https://testanything.org/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Test Anything Protocol
3+
description: Issue provider which allows you to read issues from Test Anything Protocol files.
4+
status: new
5+
---
6+
7+
Support for reading issues in [Test Anything Protocol (TAP)](https://testanything.org/){target="_blank"} format
8+
is implemented in the [Cake.Issues.Tap addin](https://cakebuild.net/extensions/cake-issues-tap/){target="_blank"}.
9+
10+
<div class="grid cards" markdown>
11+
12+
- :material-creation-outline: [Features](features.md)
13+
- :material-api: [API](https://cakebuild.net/extensions/cake-issues-tap){target="_blank"}
14+
15+
</div>

docs/input/documentation/supported-tools.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ This pages lists tools known to be working with Cake Issues (1)
3333

3434
{{ read_csv('assets/tables/supported-tools-clojure.csv',keep_default_na=False) }}
3535

36+
## CSS, SCSS, Sass
37+
38+
{{ read_csv('assets/tables/supported-tools-css.csv',keep_default_na=False) }}
39+
3640
## Dockerfile
3741

3842
{{ read_csv('assets/tables/supported-tools-docker.csv',keep_default_na=False) }}
@@ -81,6 +85,10 @@ This pages lists tools known to be working with Cake Issues (1)
8185

8286
{{ read_csv('assets/tables/supported-tools-markdown.csv',keep_default_na=False) }}
8387

88+
## Natural language
89+
90+
{{ read_csv('assets/tables/supported-tools-natural-language.csv',keep_default_na=False) }}
91+
8492
## OpenAPI
8593

8694
{{ read_csv('assets/tables/supported-tools-openapi.csv',keep_default_na=False) }}

docs/mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ nav:
207207
- documentation/issue-providers/sarif/index.md
208208
- Features: documentation/issue-providers/sarif/features.md
209209
- API: https://cakebuild.net/extensions/cake-issues-sarif" target="_blank
210+
- Test Anything Protocol (TAP):
211+
- documentation/issue-providers/tap/index.md
212+
- Features: documentation/issue-providers/tap/features.md
213+
- API: https://cakebuild.net/extensions/cake-issues-tap" target="_blank
210214
- Terraform:
211215
- documentation/issue-providers/terraform/index.md
212216
- Features: documentation/issue-providers/terraform/features.md
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Support for reading TAP compatible files using the Cake.Issues addin for Cake Frosting
2+
3+
> **NOTE**:
4+
> This is the version of the addin compatible with [Cake Frosting].
5+
> For addin compatible with [Cake .NET Tool] see [Cake.Issues.Tap](https://www.nuget.org/packages/Cake.Issues.Tap).
6+
7+
The TAP support for the Cake.Issues addin for Cake allows you to read Test Anything Protocol (TAP) compatible files.
8+
9+
Cake.Issues redefines issue management within the Cake build system by offering a comprehensive, universal, and extensible solution.
10+
The unique capabilities of the addins empower development teams to enforce coding standards, generate insightful reports,
11+
seamlessly incorporate various linting tools, and streamlining the integration with pull requests.
12+
With its [modular architecture] and extensive [set of aliases], Cake.Issues provides a future-proof infrastructure for issue management
13+
in Cake builds, fostering a more efficient and adaptable development process.
14+
15+
For more information and extensive documentation see the [Cake.Issues website](https://cakeissues.net).
16+
For general information about the Cake build automation system see the [Cake website](http://cakebuild.net).
17+
18+
## How to use
19+
20+
Integrating Cake.Issues into your Cake build is straightforward.
21+
With minimal setup, teams can enjoy the benefits of enhanced code quality management seamlessly integrated into their existing build pipeline.
22+
23+
After adding the addin the TAP log file can be parsed:
24+
25+
```csharp
26+
[TaskName("Analyze")]
27+
public sealed class AnalyzeTask : FrostingTask<BuildContext>
28+
{
29+
public override void Run(BuildContext context)
30+
{
31+
var logPath = @"c:\build\log.tap";
32+
var repoRootPath = @"c:\repo";
33+
34+
// Read issues.
35+
var issues =
36+
context.ReadIssues(
37+
context.TapIssuesFromFilePath(logPath),
38+
repoRootPath);
39+
40+
context.Information("{0} issues are found.", issues.Count());
41+
}
42+
}
43+
```
44+
45+
## Support & Discussion
46+
47+
For questions and to discuss ideas & feature requests, use the [GitHub discussions on the Cake GitHub repository](https://github.com/cake-build/cake/discussions), under the [Extension Q&A](https://github.com/orgs/cake-build/discussions/categories/extension-q-a) category.
48+
49+
## Contributing
50+
51+
Contributions are welcome. See [Contribution Guidelines](https://github.com/cake-contrib/Cake.Issues/blob/develop/CONTRIBUTING.md).
52+
53+
## License
54+
55+
[MIT License - Copyright © Cake Issues contributors](LICENSE)
56+
57+
Binary distributions for some addins contain third-party code which is licensed under its own respective license.
58+
See [LICENSE](https://github.com/cake-contrib/Cake.Issues/blob/develop/LICENSE) for details.
59+
60+
[modular architecture]: https://cakeissues.net/latest/documentation/how-cake-issues-works/
61+
[set of aliases]: https://cakeissues.net/latest/api/
62+
[Cake Frosting]: https://cakebuild.net/docs/running-builds/runners/cake-frosting
63+
[Cake .NET Tool]: https://cakebuild.net/docs/running-builds/runners/dotnet-tool

0 commit comments

Comments
 (0)