mirror of
https://github.com/curl/curl.git
synced 2026-07-24 12:07:17 +03:00
GHA: make the spacecheck say line number for trailing space errors
As it can be quite confusing and frustrating without it. Closes #17777
This commit is contained in:
parent
ff15eef2d6
commit
a3272c526c
1 changed files with 8 additions and 2 deletions
10
.github/scripts/spacecheck.pl
vendored
10
.github/scripts/spacecheck.pl
vendored
|
|
@ -131,8 +131,14 @@ while(my $filename = <$git_ls_files>) {
|
|||
}
|
||||
|
||||
if(!fn_match($filename, @space_at_eol) &&
|
||||
$content =~ /[ \t]\n/) {
|
||||
push @err, "content: has line-ending whitespace";
|
||||
$content =~ /[ \t]\n/) {
|
||||
my $line;
|
||||
for my $l (split(/\n/, $content)) {
|
||||
$line++;
|
||||
if($l =~ /[ \t]$/) {
|
||||
push @err, "line $line: trailing whitespace";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($content ne "" &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue