Skip to content

Commit fab01c8

Browse files
perltidy 20260705hartwork
authored andcommitted
Mass-apply perltidy 20260705
1 parent 9046903 commit fab01c8

15 files changed

Lines changed: 621 additions & 426 deletions

File tree

bin/genhtml

Lines changed: 196 additions & 109 deletions
Large diffs are not rendered by default.

bin/geninfo

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -884,15 +884,16 @@ sub add_worklist_entry
884884
{
885885
my ($self, $filename, $directory) = @_;
886886
if (exists($self->[1]->{$filename})) {
887-
lcovutil::ignorable_error($lcovutil::ERROR_USAGE,
888-
"duplicate file $filename in both " .
889-
$self->[1]->{$filename} .
890-
" and $directory"
891-
.
892-
(lcovutil::is_ignored(
893-
$lcovutil::ERROR_USAGE) ?
894-
' (skip latter)' :
895-
''));
887+
lcovutil::ignorable_error(
888+
$lcovutil::ERROR_USAGE,
889+
"duplicate file $filename in both " .
890+
$self->[1]->{$filename} .
891+
" and $directory"
892+
.
893+
(
894+
lcovutil::is_ignored($lcovutil::ERROR_USAGE)
895+
? ' (skip latter)' :
896+
''));
896897
return;
897898
}
898899
$self->[1]->{$filename} = $directory;
@@ -1337,8 +1338,8 @@ sub gen_info(@)
13371338
@predicted =
13381339
sort({ $b->[1] <=> $a->[1] or $a->[2] cmp $b->[2] } @predicted);
13391340

1340-
lcovutil::info(scalar(@unknown) .
1341-
' (of ' . (scalar(@predicted) + scalar(@unknown)) .
1341+
lcovutil::info(scalar(@unknown) . ' (of ' .
1342+
(scalar(@predicted) + scalar(@unknown)) .
13421343
") files do not appear in \'--history\' profile.\n")
13431344
if (@unknown);
13441345
if (@predicted) {
@@ -1548,8 +1549,8 @@ sub gen_info(@)
15481549
$lcovutil::maxParallelism = 1;
15491550
if ($chunk->[0]) {
15501551
my $num = scalar(@{$chunk->[1]});
1551-
lcovutil::info(
1552-
"Processing $num file" . ($num == 1 ? '' : 's') .
1552+
lcovutil::info("Processing $num file" .
1553+
($num == 1 ? '' : 's') .
15531554
" from chunk 0 serially\n");
15541555
}
15551556
my $now = Time::HiRes::gettimeofday();
@@ -1663,8 +1664,9 @@ sub process_dafile($$$$)
16631664

16641665
# Try to find base directory automatically if requested by user
16651666
if ($lcovutil::rc_auto_base) {
1666-
$base_dir = find_base_from_source($base_dir,
1667-
[keys(%{$instr}), keys(%{$graph})]);
1667+
$base_dir =
1668+
find_base_from_source($base_dir,
1669+
[keys(%{$instr}), keys(%{$graph})]);
16681670
}
16691671

16701672
adjust_source_filenames($instr, $base_dir);
@@ -1767,8 +1769,9 @@ sub process_dafile($$$$)
17671769
# Skip files that are not mentioned in the graph file
17681770
if (!@matches) {
17691771
lcovutil::ignorable_error($lcovutil::ERROR_MISMATCH,
1770-
"cannot find an entry for " .
1771-
$gcov_file . " in $graph_file_extension file");
1772+
"cannot find an entry for " .
1773+
$gcov_file .
1774+
" in $graph_file_extension file");
17721775
unlink($gcov_file) unless $lcovutil::preserve_intermediates;
17731776
next;
17741777
}
@@ -1777,8 +1780,9 @@ sub process_dafile($$$$)
17771780
$source_filename = $matches[0];
17781781
} else {
17791782
# Try to solve the ambiguity
1780-
$source_filename = solve_ambiguous_match($gcov_file, \@matches,
1781-
\@gcov_content);
1783+
$source_filename =
1784+
solve_ambiguous_match($gcov_file, \@matches,
1785+
\@gcov_content);
17821786
}
17831787
$source_filename =
17841788
ReadCurrentSource::resolve_path($source_filename, 1);
@@ -2647,8 +2651,7 @@ sub intermediate_json_to_info($)
26472651
);
26482652
if ($lcovutil::opt_adjust_unexecuted_blocks) {
26492653
$count = 0;
2650-
} elsif (
2651-
lcovutil::warn_once("unexecuted block",
2654+
} elsif (lcovutil::warn_once("unexecuted block",
26522655
$ERROR_INCONSISTENT_DATA)
26532656
) {
26542657
lcovutil::ignorable_warning($ERROR_INCONSISTENT_DATA,
@@ -3180,8 +3183,9 @@ sub process_graphfile($$)
31803183

31813184
# Try to find base directory automatically if requested by user
31823185
if ($lcovutil::rc_auto_base) {
3183-
$base_dir = find_base_from_source($base_dir,
3184-
[keys(%{$instr}), keys(%{$graph})]);
3186+
$base_dir =
3187+
find_base_from_source($base_dir,
3188+
[keys(%{$instr}), keys(%{$graph})]);
31853189
}
31863190

31873191
adjust_source_filenames($instr, $base_dir);

bin/lcov

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,14 @@ if (@ARGV &&
311311
$reset)
312312
) {
313313
die("Extra parameter found: '" .
314-
join(" ", @ARGV) .
315-
"'\n" . "Use $tool_name --help to get usage information\n");
314+
join(" ", @ARGV) . "'\n" .
315+
"Use $tool_name --help to get usage information\n");
316316
}
317317

318318
if (!@ARGV) {
319319
if ($directory || $kernel_directory) {
320-
die("--" . ($directory ? "directory" : "kernel-directory") .
320+
die("--" .
321+
($directory ? "directory" : "kernel-directory") .
321322
" specified but no directories provided\n" .
322323
"Use $tool_name --help to get usage information\n");
323324
}
@@ -327,7 +328,8 @@ if (!@ARGV) {
327328
[scalar(@intersect), '--intersect'],
328329
[scalar(@difference), '--subtract'],
329330
) {
330-
die($d->[1] . " specified but no tracefiles provided\n" .
331+
die($d->[1] .
332+
" specified but no tracefiles provided\n" .
331333
"Use $tool_name --help to get usage information\n")
332334
if ($d->[0]);
333335
}
@@ -404,7 +406,8 @@ eval {
404406

405407
info("Pruned result: retained " .
406408
scalar(@$pruned) . " of " .
407-
scalar(@$merged) . " files\n");
409+
scalar(@$merged) .
410+
" files\n");
408411
my $file = InOutFile->out($output_filename);
409412
my $hdl = $file->hdl();
410413
print($hdl join("\n", @$pruned) . "\n");
@@ -595,7 +598,8 @@ sub check_options()
595598
$i > 1) {
596599
die("invalid command line:\n $0 " .
597600
join(' ', @main::cmdArgs) .
598-
"\nNeed " . ($i > 1 ? 'only ' : '') .
601+
"\nNeed " .
602+
($i > 1 ? 'only ' : '') .
599603
"one of options -z, -c, -a, -e, -r, -l, --intersect, --subtract, or --summary\n"
600604
. "Use $tool_name --help to get usage information\n");
601605
}
@@ -894,8 +898,7 @@ sub lcov_geninfo(@)
894898
}
895899
push(@param, "--base-directory", $base_directory)
896900
if $base_directory;
897-
foreach (
898-
split($lcovutil::split_char,
901+
foreach (split($lcovutil::split_char,
899902
join($lcovutil::split_char, @lcovutil::opt_ignore_errors))
900903
) {
901904
# pass only the 'ignore' options that geninfo understands
@@ -1605,14 +1608,15 @@ sub merge_traces($$)
16051608

16061609
my @data = AggregateTraces::find_from_glob(@ARGV);
16071610
info('.. found: ' .
1608-
scalar(@data) . " 'base' trace file" .
1611+
scalar(@data) .
1612+
" 'base' trace file" .
16091613
(1 == scalar(@data) ? '' : 's') . ".\n");
16101614
die("must specify at least one 'base' tracefile")
16111615
unless @data;
16121616
my @merge = AggregateTraces::find_from_glob(@$list);
16131617
info(' ' .
1614-
scalar(@merge) .
1615-
' file' . (1 == scalar(@merge) ? '' : 's') . ' to ' .
1618+
scalar(@merge) . ' file' .
1619+
(1 == scalar(@merge) ? '' : 's') . ' to ' .
16161620
($op == TraceInfo::INTERSECT ? 'intersect' : 'subtract') . ".\n");
16171621

16181622
my $srcReader = ReadCurrentSource->new();
@@ -2022,7 +2026,8 @@ sub setup_gkv()
20222026
# Check /proc
20232027
$dir = defined($gcov_dir) ? $gcov_dir : $proc_dir;
20242028
if (check_gkv_proc($dir)) {
2025-
info("Found " . $GKV_NAME[$GKV_PROC] .
2029+
info("Found " .
2030+
$GKV_NAME[$GKV_PROC] .
20262031
" gcov kernel support at $dir\n");
20272032
return ($GKV_PROC, $dir);
20282033
}

bin/perl2lcov

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,10 @@ foreach my $db_path (@ARGV) {
256256
) {
257257
next unless defined($c->[1]);
258258
foreach my $line ($c->[1]->items) {
259-
lcovutil::ignorable_error($lcovutil::ERROR_INCONSISTENT_DATA,
260-
'found ' . $c->[0] .
259+
lcovutil::ignorable_error(
260+
$lcovutil::ERROR_INCONSISTENT_DATA,
261+
'found ' .
262+
$c->[0] .
261263
" coverpoint on $line but no lineCov there"
262264
) unless defined($stmts->location($line));
263265
}
@@ -414,7 +416,8 @@ foreach my $db_path (@ARGV) {
414416
--$last;
415417
}
416418
lcovutil::info(1,
417-
"resetting " . $func->name() .
419+
"resetting " .
420+
$func->name() .
418421
" end line to $last (from $end)\n");
419422
$func->set_end_line($last);
420423

0 commit comments

Comments
 (0)