|
| 1 | +--- |
| 2 | +title: Cake Issues v5.2.0 Released |
| 3 | +date: 2025-01-09 |
| 4 | +categories: |
| 5 | + - Release Notes |
| 6 | +search: |
| 7 | + boost: 0.5 |
| 8 | +--- |
| 9 | + |
| 10 | +Cake Issues version 5.2.0 has been released bringing improvements to build breaking and SARIF issue provider. |
| 11 | + |
| 12 | +<!-- more --> |
| 13 | + |
| 14 | +This post shows the highlights included in this release. |
| 15 | +For update instructions skip to [Updating from previous versions](#updating-from-previous-versions). |
| 16 | + |
| 17 | +❤ Huge thanks to our community! This release would not have been possible without your support and contributions! ❤ |
| 18 | + |
| 19 | +People working on this release: |
| 20 | + |
| 21 | +* [eoehen](https://github.com/eoehen){target="_blank"} |
| 22 | +* [pascalberger](https://github.com/pascalberger){target="_blank"} |
| 23 | + |
| 24 | +## Support for suppressed issues in SARIF files. |
| 25 | + |
| 26 | +SARIF supports [suppressions]{target="_blank"} for issues which are suppressed, either in the source code or through some external tool. |
| 27 | + |
| 28 | +Until now this property was ignored. |
| 29 | +Starting with Cake Issues 5.2.0 issues which are marked as suppressed in a SARIF file will no longer be imported by default. |
| 30 | +There is a new setting `IgnoreSuppressedIssues` which can be disabled to continue reading suppressed issues. |
| 31 | + |
| 32 | +## Additional alias for build breaking |
| 33 | + |
| 34 | +There is a new alias for fails build if any issues are found with settings to limit to priority and issue provider types to complement |
| 35 | +the already existing [aliases for failing builds]{target="_blank"}. |
| 36 | + |
| 37 | +The following example fails build if issues with severity warning or higher from MsBuild are found: |
| 38 | + |
| 39 | +=== "Cake .NET Tool" |
| 40 | + |
| 41 | + ```csharp |
| 42 | + BreakBuildOnIssues( |
| 43 | + issues, |
| 44 | + new BuildBreakingSettings |
| 45 | + { |
| 46 | + MinimumPriority = IssuePriority.Warning, |
| 47 | + IssueProvidersToConsider = [MsBuildIssuesProviderTypeName] |
| 48 | + }); |
| 49 | + ``` |
| 50 | + |
| 51 | +=== "Cake Frosting" |
| 52 | + |
| 53 | + ```csharp |
| 54 | + context.BreakBuildOnIssues( |
| 55 | + issues, |
| 56 | + new BuildBreakingSettings |
| 57 | + { |
| 58 | + MinimumPriority = IssuePriority.Warning, |
| 59 | + IssueProvidersToConsider = [context.MsBuildIssuesProviderTypeName()] |
| 60 | + }); |
| 61 | + ``` |
| 62 | + |
| 63 | +The following example fails build if issues with severity warning or higher are found, ignoring issues reported by MsBuild: |
| 64 | + |
| 65 | +=== "Cake .NET Tool" |
| 66 | + |
| 67 | + ```csharp |
| 68 | + BreakBuildOnIssues( |
| 69 | + issues, |
| 70 | + new BuildBreakingSettings |
| 71 | + { |
| 72 | + MinimumPriority = IssuePriority.Warning, |
| 73 | + IssueProvidersToIgnore = [MsBuildIssuesProviderTypeName] |
| 74 | + }); |
| 75 | + ``` |
| 76 | + |
| 77 | +=== "Cake Frosting" |
| 78 | + |
| 79 | + ```csharp |
| 80 | + context.BreakBuildOnIssues( |
| 81 | + issues, |
| 82 | + new BuildBreakingSettings |
| 83 | + { |
| 84 | + MinimumPriority = IssuePriority.Warning, |
| 85 | + IssueProvidersToIgnore = [context.MsBuildIssuesProviderTypeName()] |
| 86 | + }); |
| 87 | + ``` |
| 88 | + |
| 89 | +## Support for failing builds in Cake Issues Recipe |
| 90 | + |
| 91 | +Cake Issues Recipe has new configuration options to support failing of builds if any issues are found: |
| 92 | + |
| 93 | +- `ShouldFailBuildOnIssues`: Indicates whether build should fail if any issues are found |
| 94 | +- `MinimumPriority`: Minimum priority of issues considered to fail the build |
| 95 | +- `IssueProvidersToConsider`: List of issue provider types to consider |
| 96 | +- `IssueProvidersToIgnore`: List of issue provider types to ignore |
| 97 | + |
| 98 | +## Updating from previous versions |
| 99 | + |
| 100 | +Cake.Issues 5.2.0 addins are compatible with any 5.x addins. |
| 101 | +To update to the new version bump the version of the specific addins. |
| 102 | + |
| 103 | +For details see [release notes](https://github.com/cake-contrib/Cake.Issues/releases/tag/5.2.0){target="_blank"} |
| 104 | + |
| 105 | +[suppressions]: https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/sarif-v2.1.0-errata01-os-complete.html#_Toc141790911 |
| 106 | +[aliases for failing builds]: https://cakebuild.net/extensions/cake-issues/#Build-Breaking |
| 107 | +[Cake Issues Recipe]: ../../documentation/recipe/index.md |
0 commit comments