Branch Coverage

File:lib/CheckSpelling/SpellingCollator.pm
Coverage:72.2%

line%coveragebranch
16100TFunless $record =~ /\b$field:\s*(\d+)/
2250TFunless $record =~ /\b$field: \[([^\]]+)\]/
2950TFunless $next and $next < $value
38100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
100TFelsif ($item =~ /^([A-Z])(.*)/) { }
40100TFif $value < $next
43100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
48100TFif (defined $CheckSpelling::SpellingCollator::expected{$item})
54100TFunless defined $next
61100TFif expect_item($word, 1)
6350TFif expect_item($key, 2)
64100TFif ($key =~ /.s$/) { }
100TFelsif ($key =~ /^(.+[^aeiou])ed$/) { }
100TFelsif ($key =~ /^(.+)'[ds]$/) { }
65100TFif ($key =~ /ies$/) { }
7750TFif expect_item($key, 3)
83100TFif skip_item($item)
85100TFif (defined $seen_count)
86100TFif (not defined $unknown_word_limit or $seen_count++ < $unknown_word_limit) { }
10150TFif $CheckSpelling::SpellingCollator::disable_word_collating
103100TFif ($key =~ /.s$/) { }
100TFelsif ($key =~ /.[^aeiou]ed$/) { }
104100TFif ($key =~ /ies$/) { }
118100TFif ($CheckSpelling::SpellingCollator::disable_word_collating) { }
13550TFif (open EXPECT, "<:utf8", $expect)
152100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
154100TFif defined $word_map{$word}
15650TFif $words > 2
157100TFif ($word eq $key)
15850TFif $words > 1
167100TFif $CheckSpelling::SpellingCollator::disable_word_collating
173100TFif $key eq $plural_key
174100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
189100TFif ($warning =~ /\(([-\w]+)\)$/)
19150TFif defined $CheckSpelling::SpellingCollator::ignored_event_map{$code}
205100TFunless defined $ENV{$path}
20750TFunless open ITEMS, "<:utf8", $1
213100TFif ($pattern =~ /^#/)
21450TFif ($pattern =~ /^# /) { }
22250TFunless ($pattern =~ /./)
235100TFunless @{$totals;}
23650TFunless open my $fh, ">:utf8", $path
23950TFif ($file_counts) { }
2410TFunless $totals->[$b] <=> $totals->[$a]
25050TFunless $totals->[$i] > 0
25350TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/s) { }
25850TF$file_counts ? :
27850TFif ($ignored_events)
30050TFif ($timing_report)
31950TFunless $directory =~ /^(.*)$/
321100TFunless (-e $directory)
325100TFunless (-d $directory)
331100TFunless open NAME, "<:utf8", "$directory/name"
34050TFif ($timing_report)
344100TFif (-e "$directory/skipped")
35250TFif $timing_report
357100TFunless (-s "$directory/stats")
35950TFif $timing_report
363100TFif ($file eq $file_list)
38450TFif (@candidate_totals)
3870TFif (@candidate_list)
3900TFif ($hits)
3920TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
403100TFif (@forbidden_totals)
40650TFif (@forbidden_list)
40950TFif ($hits)
41850TFif $timing_report
42050TFif ($unknown > $unique)
4240TFunless ($disable_noisy_file)
4250TFif ($file ne $file_list) { }
435100TFunless (-s "$directory/unknown")
442100TFunless $token =~ /./
444100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
446100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
45450TFif $timing_report
47350TFif ($context =~ /^(.*?)$(.*)/ms)
47550TFif $details
47750TFunless $context
487100TFif (defined $ENV{'expect'})
497100TFif (-s $early_warnings)
510100TFunless -s "$directory/warnings"
51150TFunless open NAME, "<:utf8", "$directory/name"
516100TFif (not $is_file_list) { }
519100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/) { }
523100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
52550TFif ($warning =~ /\`(.*?)\` in line\. \(token-is-substring\)/)
5260TFif skip_item($1)
53550TFunless $warning =~ s/^:(\d+)/:1/
537100TFif ($warning =~ s/:(\d+ \.\.\. \d+): `(.*)`/:$1, Warning - `$2` is not a recognized word. (check-file-path)/)
53850TFif skip_item($2)
53950TFif (defined $unknown_file_word_limit)
540100TFif ++$unknown_file_word_count{$2} > $unknown_file_word_limit
555100TFif (defined $unknown_word_limit)
5580TFunless $warning_count >= $unknown_word_limit
567100TFif (%counters)
583100TFif (scalar @words > 1) { }
58450TFunless length $a <=> length $b