From 91e299e5e26d1857682c66de8cd21ee570a0c506 Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Fri, 2 Jan 2026 13:55:23 -0700 Subject: [PATCH] Add message to PG critic output if no issues are found. --- .../Instructor/PGProblemEditor/pg_critic.html.ep | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/ContentGenerator/Instructor/PGProblemEditor/pg_critic.html.ep b/templates/ContentGenerator/Instructor/PGProblemEditor/pg_critic.html.ep index 7659b7453c..33de2acdcf 100644 --- a/templates/ContentGenerator/Instructor/PGProblemEditor/pg_critic.html.ep +++ b/templates/ContentGenerator/Instructor/PGProblemEditor/pg_critic.html.ep @@ -2,7 +2,11 @@ %

<%= maketext('PG Critic Violations') %>

- % my @pgCriticViolations = grep { $_->policy =~ /^Perl::Critic::Policy::PG::/ } @$violations; + % my @pgCriticViolations = grep { $_->policy =~ /^Perl::Critic::Policy::PG::/ } @$violations; + % my @perlCriticViolations = grep { $_->policy !~ /^Perl::Critic::Policy::PG::/ } @$violations; + % unless (@pgCriticViolations || @perlCriticViolations) { +

<%= maketext('Congratulations! No PG critic violations found.') %>

+ % } % if (@pgCriticViolations) {

<%= maketext('The following PG issues should be fixed:') %>

- %} - % my @perlCriticViolations = grep { $_->policy !~ /^Perl::Critic::Policy::PG::/ } @$violations; + % } % if (@perlCriticViolations) {

<%= maketext('The following general Perl issues should be fixed:') %>

- %} + % }