Skip to content

Commit

Permalink
Update current uses and syntax of no critic
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Elie committed Sep 8, 2024
1 parent 6e6ad05 commit c3e707e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions contrib/analyze-traffic.in
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,12 @@ sub max {
my $who;
my ($field, $listref) = @_;

## no critic (Community::Each)
while (my ($peer, $statsref) = each %{$listref}) {
while (my ($peer, $statsref) = each %{$listref}) { ## no critic (Each)
if ($statsref->{$field} > $x) {
$x = $statsref->{$field};
$who = $peer;
}
}
## use critic

return ($x, $who);
}
Expand Down
6 changes: 2 additions & 4 deletions scripts/innreport.in
Original file line number Diff line number Diff line change
Expand Up @@ -895,15 +895,13 @@ sub ComputeTotalDouble($) {
if (defined($cached) && !$DEBUG) { return $cached; }

my $total = 0;
## no critic (Community::Each)
while (my ($key1, $value1) = each %$h) {
while (my ($key1, $value1) = each %$h) { ## no critic (Community::Each)
confess $key1 unless (defined($value1));
while (my ($key2, $value2) = each %$value1) {
while (my ($key2, $value2) = each %$value1) { ## no critic (Each)
confess $key2 unless (defined($value2));
$total += $value2;
}
}
## use critic
if (defined($cached) && $cached != $total) {
confess "ComputeTotalDouble mismatch $cached != $total";
}
Expand Down
3 changes: 1 addition & 2 deletions scripts/innshellvars.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
package inn;

# Tons of variables, also coming from innconfval run through an eval below.
## no critic (ProhibitProlongedStrictureOverride)
no strict;
no strict; ## no critic (ProhibitProlongedStrictureOverride)

$ENV{'LC_CTYPE'} = "C";

Expand Down
3 changes: 0 additions & 3 deletions tests/docs/pod.t.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,10 @@ chdir($root) or BAIL_OUT("cannot chdir to $root: $!");

# Add some additional exclusions, useful mostly for other programs that copy
# this test.
## no critic (TestingAndDebugging::ProhibitNoWarnings)
## no critic (Variables::ProhibitPackageVars)
{
$Test::Pod::ignore_dirs{'.libs'} = 'libraries';
$Test::Pod::ignore_dirs{'tests'} = 'test suite';
}
## use critic

# Check syntax of every POD file we can find.
all_pod_files_ok(q{.});

0 comments on commit c3e707e

Please sign in to comment.