File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ plan +@files;
12
12
for @ files . sort -> $ file {
13
13
my $ ok = True ;
14
14
my $ row = 0 ;
15
+ my @ bad ;
15
16
for $ file . IO . slurp . lines -> $ line {
16
17
$ row ++ ;
17
18
if $ line ~~ / ^ \s + / {
@@ -20,13 +21,14 @@ for @files.sort -> $file {
20
21
for $ line ~~ m :g / <! after 'implementing ' > 'Perl' $ < space > =(\s + ) \d / -> $ match {
21
22
my $ spaces = ~ $ match <space >;
22
23
if $ spaces . chars != 1 || $ spaces . uniname ne " NO-BREAK SPACE" {
23
- $ ok = False ; last ;
24
+ $ ok = False ;
25
+ @ bad . push : $ row ;
24
26
}
25
27
}
26
28
}
27
29
my $ error = $ file ;
28
30
if ! $ ok {
29
- $ error ~ = " (line $ row )" ;
31
+ $ error ~ = " (line{ @ bad > 1 ?? " s " !! " " } { @ bad . join : ' , ' } )" ;
30
32
}
31
33
ok $ ok , " $ error : Perl followed by a version should have a single non-breaking space." ;
32
34
}
You can’t perform that action at this time.
0 commit comments