Aliases.

BreakBuildOnIssues(ICakeContext, IEnumerable<IIssue>, BuildBreakingSettings, Action<IEnumerable<IIssue>>) Method

Summary

Fails build if any issues are found with settings to limit to priority and issue provider types.
Assembly
Cake.Issues.dll
Namespace
Cake.Issues
Containing Type
Aliases

Syntax

public static void BreakBuildOnIssues(this ICakeContext context, IEnumerable<IIssue> issues, BuildBreakingSettings settings, Action<IEnumerable<IIssue>> handler)

Examples

Fails build if issues with severity warning or higher from MsBuild are found:

BreakBuildOnIssues(
        issues,
        new BuildBreakingSettings
        {
            MinimumPriority = IssuePriority.Warning
            IssueProvidersToConsider = [MsBuildIssuesProviderTypeName]
        },
        x => Information("{0} issues found", x.Count()));

Fails build if issues with severity warning or higher are found, ignoring MsBuild issues:

BreakBuildOnIssues(
        issues,
        new BuildBreakingSettings
        {
            MinimumPriority = IssuePriority.Warning
            IssueProvidersToIgnore = [MsBuildIssuesProviderTypeName]
        },
        x => Information("{0} issues found", x.Count()));

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
issues IEnumerable<IIssue> Issues which should be checked.
settings BuildBreakingSettings Settings to apply.
handler Action<IEnumerable<IIssue>> Optional handler to call when issues matching parameters are found.

Return Value

Type Description
void