Perl-Critic / PPI

53 stars 44 forks source link

Preserve whitespace in signatures #257

Closed oalders closed 2 years ago

oalders commented 3 years ago

I realize that PPI does not know about signatures, but when it treats them as prototypes it also removes any newlines inside the signature. So, something like:

sub foo (
    $self, $bar,
    $thing_id = 12
) {
    1;
}

gets turned into

sub foo (    $self, $bar,    $thing_id = 12) {
    1;
}

I have no idea about the correctness of this change, but it doesn't appear to break any existing tests, so there's that. ;)

oalders commented 2 years ago

@haarg could you review this one?

oalders commented 2 years ago

Thanks, @haarg!