Skip to content

Commit

Permalink
Print issues to console in case build is failed (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger authored Jan 16, 2025
1 parent f150ac4 commit d16c24a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ public override void Run(IIssuesContext context)
MinimumPriority = context.Parameters.BuildBreaking.MinimumPriority,
IssueProvidersToConsider = context.Parameters.BuildBreaking.IssueProvidersToConsider,
IssueProvidersToIgnore = context.Parameters.BuildBreaking.IssueProvidersToIgnore
},
x =>
{
// Print issues to console before failing build.
_ = context.CreateIssueReport(
x,
context.ConsoleIssueReportFormat(
new ConsoleIssueReportFormatSettings
{
Compact = true,
GroupByRule = true,
}),
context.State.ProjectRootDirectory,
string.Empty);
});
}
}
Expand Down
14 changes: 14 additions & 0 deletions Cake.Issues.Recipe/Content/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ IssuesBuildTasks.IssuesTask = Task("Issues")
MinimumPriority = IssuesParameters.BuildBreaking.MinimumPriority,
IssueProvidersToConsider = IssuesParameters.BuildBreaking.IssueProvidersToConsider,
IssueProvidersToIgnore = IssuesParameters.BuildBreaking.IssueProvidersToIgnore
},
x =>
{
// Print issues to console before failing build.
_ = CreateIssueReport(
x,
ConsoleIssueReportFormat(
new ConsoleIssueReportFormatSettings
{
Compact = true,
GroupByRule = true,
}),
data.ProjectRootDirectory,
string.Empty);
});
}
});
Expand Down

0 comments on commit d16c24a

Please sign in to comment.