Branch Coverage

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

line%coveragebranch
22100TFunless $record =~ /\b$field:\s*(\d+)/u
2850TFunless $record =~ /\b$field: \[([^\]]+)\]/u
3550TFunless $next and $next < $value
45100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
100TFelsif ($item =~ /^([A-Z])(.*)/u) { }
47100TFif $value < $next
50100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
55100TFif (defined $CheckSpelling::SpellingCollator::expected{$item})
61100TFunless defined $next
68100TFif expect_item($word, 1)
7050TFif expect_item($key, 2)
71100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /^(.+[^aeiou])ed$/u) { }
100TFelsif ($key =~ /^(.+)'[ds]$/u) { }
72100TFif ($key =~ /ies$/u) { }
8450TFif expect_item($key, 3)
90100TFif ($warning =~ /\(([-\w]+)\)$/u)
9350TFif $CheckSpelling::SpellingCollator::ignored_event_map{$code}
10050TFunless $warning =~ /\(([-\w]+)\)$/u
103100TFif $CheckSpelling::SpellingCollator::ignored_event_map{$code}
11250TFif should_skip_warning($warning)
113100TFif skip_item($item)
116100TFif (defined $seen_count)
117100TFif (not defined $unknown_word_limit or $seen_count++ < $unknown_word_limit) { }
13350TFif $CheckSpelling::SpellingCollator::disable_word_collating
135100TFunless defined $CheckSpelling::SpellingCollator::shortest_word
138100TFif ($key =~ /.s$/u) { }
100TFelsif ($key_length > $CheckSpelling::SpellingCollator::shortest_word + 1 and $key =~ /.[^aeiou]ed$/u) { }
139100TFif ($key_length > $CheckSpelling::SpellingCollator::shortest_word + 1 and $key =~ /ies$/u) { }
100TFelsif ($key_length > $CheckSpelling::SpellingCollator::shortest_word and not $key =~ /ies$/u) { }
154100TFif ($CheckSpelling::SpellingCollator::disable_word_collating) { }
17150TFif (open EXPECT, "<:utf8", $expect)
188100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
190100TFif defined $word_map{$word}
19250TFif $words > 2
193100TFif ($word eq $key)
19450TFif $words > 1
203100TFif $CheckSpelling::SpellingCollator::disable_word_collating
209100TFif $key eq $plural_key
210100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
225100TFif ($warning =~ /\(([-\w]+)\)$/u)
227100TFif defined $CheckSpelling::SpellingCollator::ignored_event_map{$code}
24250TFunless defined $ENV{$path}
24450TFunless open ITEMS, "<:utf8", $1
250100TFif ($pattern =~ /^#/u)
25150TFif ($pattern =~ /^# /u) { }
259100TFunless ($pattern =~ /./u)
272100TFunless @{$totals;}
27350TFunless open my $fh, ">:utf8", $path
276100TFif ($file_counts) { }
2780TFunless $totals->[$b] <=> $totals->[$a]
28750TFunless $totals->[$i] > 0
29050TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/su) { }
295100TF$file_counts ? :
307100TFif $file eq $special->{'file_list'}
308100TFif $file eq $special->{'pr_title_file'}
309100TFif $file eq $special->{'pr_description_file'}
310100TFunless rindex $file, $special->{'commit_messages'}
325100TFif ($ignored_events)
35650TFif ($timing_report)
37550TFunless $directory =~ /^(.*)$/u
377100TFunless (-e $directory)
381100TFunless (-d $directory)
387100TFunless open NAME, "<:utf8", "$directory/name"
39650TFif ($timing_report)
400100TFif (-e "$directory/skipped")
40850TFif $timing_report
413100TFunless (-s "$directory/stats")
41450TFif $timing_report
419100TFif ($file eq $file_list)
440100TFif (@candidate_totals)
44350TFif (@candidate_list)
44650TFif ($hits)
44850TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
45450TFif ($candidates[$i] =~ /^#\s+(\S.+)/u)
463100TFif (@forbidden_totals)
46650TFif (@forbidden_list)
46950TFif ($hits)
47850TFif $timing_report
481100TFif ($unknown > $unique)
48550TFunless ($disable_noisy_file)
48650TFif ($kind eq "file")
497100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
503100TFunless $token =~ /./u
505100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
507100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
51450TFif $timing_report
53350TFif ($context =~ /^(.*?)$(.*)/msu)
53550TFif $details
53750TFunless $context
547100TFif (defined $ENV{'expect'})
557100TFif (-s $early_warnings)
56150TFif should_skip_warning_while_counting($warning)
570100TFunless -s "$directory/warnings"
57150TFunless open NAME, "<:utf8", "$directory/name"
576100TFif ($kind ne 'file-list') { }
580100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
584100TFunless $kind eq "file"
586100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
58750TFif $kind ne "file"
59050TFif ($warning =~ /\`(.*?)\` in line \(token-is-substring\)/u)
5910TFif skip_item($1)
59550TFif should_skip_warning($warning, $code)
60150TFunless $warning =~ s/^:(\d+)/:1/u
603100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
60750TFif skip_item($item)
60850TFif (defined $unknown_file_word_limit)
609100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
612100TFif should_skip_warning_while_counting($warning)
62150TFif should_skip_warning_while_counting($warning)
624100TFif (defined $unknown_word_limit)
62750TFunless $warning_count >= $unknown_word_limit
6300TFif should_skip_warning_while_counting($warning)
636100TFif (%counters)
652100TFif (scalar @words > 1) { }
65350TFunless length $a <=> length $b
668100TFunless /(.*) \((.*)\)/u
678100TFif ($_ =~ /$pattern/u) { }
680100TFif s/not a recognized word/ignored by check-spelling because another more general variant is also in expect/u
681100TFif s/unrecognized-spelling/ignored-expect-variant/u
682100TFunless $print
684100TFunless /\(((?:\w+-)+\w+)\)$/u
685100TFif $1 eq "unrecognized-spelling"