Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: vdm-photo [...] ya.ru
Cc:
AdminCc:

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



Subject: Unexpected behavior of --indent-only option together with --delete-all-comments
Date: Thu, 28 Jan 2016 20:59:48 +0300
To: bug-perl-tidy [...] rt.cpan.org
From: Dmitry Veltishev <vdm-photo [...] ya.ru>
Hello all,
I've noticed that current version of perltidy does not remove all comments from script if --indent-only options is specified.
 
Seems that it wipes off only lines that does not contain any code.
Consider following file sample.pl:
 
----------------
use strict;
use warnings;
my $x = 1; # comment not removed
# comment will be removed
my $y = 2; # comment also not removed
----------------
running following command
perltidy --indent-only --delete-all-comments sample.pl -st
produces following output:
----------------
use strict;
use warnings;
my $x = 1; # comment not removed
my $y = 2; # comment also not removed
----------------
 
excluding --indent-only from command line arguments leads to removal of really ALL comments.
manpage section describing --indent-only does not say anything on this case.
 
As for me, this behavior is unexpected - all comments should be removed with -dac, not only "pure" comment lines.
 
 
--
Regards, Dmitry Veltishev
mailto: vdm-photo@ya.ru
Subject: Re: [rt.cpan.org #111519] Unexpected behavior of --indent-only option together with --delete-all-comments
Date: Thu, 28 Jan 2016 10:27:34 -0800
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <perltidy [...] users.sourceforge.net>
Thanks for the report, it will be easy to fix. Steve On Thu, Jan 28, 2016 at 10:00 AM, Dmitry Veltishev via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Thu Jan 28 13:00:03 2016: Request 111519 was acted upon. > Transaction: Ticket created by vdm-photo@ya.ru > Queue: Perl-Tidy > Subject: Unexpected behavior of --indent-only option together with > --delete-all-comments > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: vdm-photo@ya.ru > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=111519 > > > > Hello all,I've noticed that current version of perltidy does not remove all > comments from script if --indent-only options is specified. Seems that it > wipes > off only lines that does not contain any code.Consider following file > sample.pl: ----------------use strict;use warnings; > my $x = 1; # comment not removed > # comment will be removed > my $y = 2; # comment also not removed----------------running following > commandperltidy > --indent-only --delete-all-comments sample.pl -stproduces following > output:----------------use > strict;use warnings; > my $x = 1; # comment not removed > my $y = 2; # comment also not removed---------------- excluding > --indent-only > from command line arguments leads to removal of really ALL comments.manpage > section describing --indent-only does not say anything on this case. As > for me, > this behavior is unexpected - all comments should be removed with -dac, not > only "pure" comment lines. -- > Regards, Dmitry Veltishev > mailto: vdm-photo@ya.ru > >
Fixed in version 20160301.