Skip Menu |

This queue is for tickets about the Perl-Tidy CPAN distribution.

Report information
The Basics
Id: 94354
Status: resolved
Priority: 0/
Queue: Perl-Tidy

People
Owner: Nobody in particular
Requestors: lackita [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Stacked tokens indentation
Date: Mon, 31 Mar 2014 19:23:13 -0400
To: bug-Perl-Tidy [...] rt.cpan.org
From: Colin Williams <lackita [...] gmail.com>
https://rt.cpan.org/Public/Bug/Display.html?id=53183 causes the following to format with one level of indentation: Foo({ bar => 1, }); But the following (along with --opening-token-right) ends up with two levels of indentation: Foo($bar, { baz => 1, }); The attached patch should fix the problem.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #94354] Stacked tokens indentation
Date: Tue, 1 Apr 2014 05:52:38 -0700
To: bug-Perl-Tidy [...] rt.cpan.org
From: Steven Hancock <perltidy [...] users.sourceforge.net>
Colin, Thanks for the note. I'm not quite sure what flags you are using so I couldn't reproduce this. But the patch might run into trouble sometimes if the first opening token is actually closed somewhere before the end of line, or if it is a quoted character. I'm not sure if this would be a real problem or not. Steve On Mon, Mar 31, 2014 at 4:23 PM, Colin Williams via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Mon Mar 31 19:23:23 2014: Request 94354 was acted upon. > Transaction: Ticket created by lackita@gmail.com > Queue: Perl-Tidy > Subject: Stacked tokens indentation > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: lackita@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=94354 > > > > https://rt.cpan.org/Public/Bug/Display.html?id=53183 causes the following > to format with one level of indentation: > > Foo({ > bar => 1, > }); > > But the following (along with --opening-token-right) ends up with two > levels of indentation: > > Foo($bar, { > baz => 1, > }); > > The attached patch should fix the problem. > >
Subject: Re: [rt.cpan.org #94354] Stacked tokens indentation
Date: Tue, 1 Apr 2014 09:01:33 -0400
To: bug-Perl-Tidy [...] rt.cpan.org
From: Colin Williams <lackita [...] gmail.com>
Steve, Here are all of the arguments I'm using: --maximum-line-length=0 --paren-tightness=2 --square-bracket-tightness=2 --entab-leading-whitespace=4 --nospace-for-semicolon --paren-vertical-tightness=2 --brace-vertical-tightness=0 --opening-token-right --stack-all-containers I think the only important ones, though, are "--opening-token-right --stack-all-containers". If you're worried about the open token being closed, [^]})]* would also solve my problem. Thanks, Colin On Tue, Apr 1, 2014 at 8:52 AM, Steve Hancock via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=94354 > > > Colin, > Thanks for the note. I'm not quite sure what flags you are using so I > couldn't reproduce this. But the patch might run into trouble sometimes if > the first opening token is actually closed somewhere before the end of > line, or if it is a quoted character. I'm not sure if this would be a real > problem or not. > Steve > > > On Mon, Mar 31, 2014 at 4:23 PM, Colin Williams via RT < > bug-Perl-Tidy@rt.cpan.org> wrote: >
> > Mon Mar 31 19:23:23 2014: Request 94354 was acted upon. > > Transaction: Ticket created by lackita@gmail.com > > Queue: Perl-Tidy > > Subject: Stacked tokens indentation > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: lackita@gmail.com > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=94354 > > > > > > > https://rt.cpan.org/Public/Bug/Display.html?id=53183 causes the
> following
> > to format with one level of indentation: > > > > Foo({ > > bar => 1, > > }); > > > > But the following (along with --opening-token-right) ends up with two > > levels of indentation: > > > > Foo($bar, { > > baz => 1, > > }); > > > > The attached patch should fix the problem. > > > >
> >
Subject: Re: [rt.cpan.org #94354] Stacked tokens indentation
Date: Tue, 1 Apr 2014 06:27:53 -0700
To: bug-Perl-Tidy [...] rt.cpan.org
From: Steven Hancock <s7078hancock [...] gmail.com>
Colin, Thanks, I can reproduce it now. I'll do some testing. Steve On Tue, Apr 1, 2014 at 6:01 AM, Colin Williams via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Queue: Perl-Tidy > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=94354 > > > Steve, > > Here are all of the arguments I'm using: > > --maximum-line-length=0 > --paren-tightness=2 > --square-bracket-tightness=2 > --entab-leading-whitespace=4 > --nospace-for-semicolon > --paren-vertical-tightness=2 > --brace-vertical-tightness=0 > --opening-token-right > --stack-all-containers > > I think the only important ones, though, are "--opening-token-right > --stack-all-containers". If you're worried about the open token being > closed, [^]})]* would also solve my problem. > > Thanks, > Colin > > > On Tue, Apr 1, 2014 at 8:52 AM, Steve Hancock via RT < > bug-Perl-Tidy@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=94354 > > > > > Colin, > > Thanks for the note. I'm not quite sure what flags you are using so I > > couldn't reproduce this. But the patch might run into trouble sometimes
> if
> > the first opening token is actually closed somewhere before the end of > > line, or if it is a quoted character. I'm not sure if this would be a
> real
> > problem or not. > > Steve > > > > > > On Mon, Mar 31, 2014 at 4:23 PM, Colin Williams via RT < > > bug-Perl-Tidy@rt.cpan.org> wrote: > >
> > > Mon Mar 31 19:23:23 2014: Request 94354 was acted upon. > > > Transaction: Ticket created by lackita@gmail.com > > > Queue: Perl-Tidy > > > Subject: Stacked tokens indentation > > > Broken in: (no value) > > > Severity: (no value) > > > Owner: Nobody > > > Requestors: lackita@gmail.com > > > Status: new > > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=94354 > > > > > > > > > > https://rt.cpan.org/Public/Bug/Display.html?id=53183 causes the
> > following
> > > to format with one level of indentation: > > > > > > Foo({ > > > bar => 1, > > > }); > > > > > > But the following (along with --opening-token-right) ends up with two > > > levels of indentation: > > > > > > Foo($bar, { > > > baz => 1, > > > }); > > > > > > The attached patch should fix the problem. > > > > > >
> > > >
> >
Fixed in version 20140711.