Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#998367: perlcritic: "Code not tidy' after perltidy

14 views
Skip to first unread message

Felix Lechner

unread,
Nov 2, 2021, 7:40:03 PM11/2/21
to
Package: libperl-critic-perl
Severity: normal

Hi,

Perlcritic does not appear to use the latest version of perltidy, or
perhaps invokes it with different settings. In unstable, perlcritic
complains that files are not tidy even though perltidy just ran over
them.

Due to the large number of contributors to Lintian, Lintian's
testsuite enforces a project-wide style in Salsa CI (but not in Deb
CI). Your help would be very much appreciated.

I also mentioned it briefly on the Perl team's mailing list [1] but
have not received any replies yet. Thanks!

Kind regards
Felix Lechner

[1] https://lists.debian.org/debian-perl/2021/10/msg00025.html

* * *

Seen in Lintian on unstable:

root@6b71b0282ea8:~/lintian# perlcritic lib/Lintian/Index/Item.pm
lib/Lintian/Index/Item.pm:1:1:Code is not tidy

root@6b71b0282ea8:~/lintian# perltidy -b lib/Lintian/Index/Item.pm

root@6b71b0282ea8:~/lintian# perlcritic lib/Lintian/Index/Item.pm
lib/Lintian/Index/Item.pm:1:1:Code is not tidy

intrigeri

unread,
Nov 3, 2021, 4:00:02 AM11/3/21
to
Control: tag -1 + upstream
Control: forwarded -1 https://github.com/Perl-Critic/Perl-Critic/issues/925

Hi,

I can reproduce this even if I delete all lines from
lib/Lintian/Index/Item.pm (current master branch) except the first
5 ones:

# -*- perl -*-
# Lintian::Index::Item -- Representation of path entry in a package
#
# Copyright © 2011 Niels Thykier
# Copyright © 2020 Felix Lechner

I cannot reproduce this once I replace "©" with "(C)",
effectively making the file contain only ASCII chars.

So this seems to be
https://github.com/Perl-Critic/Perl-Critic/issues/925

Take care,
i.

Felix Lechner

unread,
Nov 3, 2021, 6:50:04 AM11/3/21
to
Control: affects -1 lintian

Hi,

On Wed, Nov 3, 2021 at 12:49 AM intrigeri <intr...@debian.org> wrote:
>
>
> I can reproduce

Thanks for the research!

> https://github.com/Perl-Critic/Perl-Critic/issues/925

That has not seen any activity in over two years. Would you consider
marking the version in unstable as unfit for release, perhaps even
replacing it with one that works with UTF-8? The version in bullseye
does not have the issue. Thanks!

Kind regards
Felix Lechner

intrigeri

unread,
Nov 8, 2021, 2:40:03 AM11/8/21
to
Control: severity -1 important

Hi,

Felix Lechner (2021-11-03):
>> https://github.com/Perl-Critic/Perl-Critic/issues/925
>
> That has not seen any activity in over two years.

FWIW, there has been renewed activity a few days ago on the
corresponding PR: https://github.com/Perl-Critic/Perl-Critic/pull/876

> Would you consider marking the version in unstable as unfit for
> release,

With the data I have in hand, this looks like severity important to
me; RC-buggy seems a bit strong handed unless a large subset of source
files these programs are run on do include UTF-8 in some place that
triggers the bug.

> The version in bullseye does not have the issue.

In combination with which version of perltidy?

(The bug lies in the interaction between these 2 tools. At first
glance, my hunch is that the problem was introduced by changes in
perltidy between Bullseye and sid.)

Cheers,
--
intrigeri

Felix Lechner

unread,
Mar 7, 2022, 6:10:03 PM3/7/22
to
Hi,

On Sun, Nov 7, 2021 at 11:37 PM intrigeri <intr...@debian.org> wrote:
>
> The bug lies in the interaction between these 2 tools.

Yay, the problem was solved! [1] Will you please deploy the fix with a
little bit of urgency? Lintian's pipeline has been malfunctioning for
a little while. Thanks!

Kind regards,
Felix Lechner

[1] https://github.com/Perl-Critic/Perl-Critic/issues/925#issuecomment-1048340859

Axel Beckert

unread,
Jul 25, 2022, 8:50:03 PM7/25/22
to
Control: reassign -1 perltidy
Control: found -1 20220217-1
Control: affects -1 + libperl-critic-perl

Hi,

Felix Lechner wrote:
> > The bug lies in the interaction between these 2 tools.
>
> Yay, the problem was solved! […]
> https://github.com/Perl-Critic/Perl-Critic/issues/925#issuecomment-1048340859

Actually that "fix" still would have needed code changes in Lintian
and other consumers. These code changes additionally would have had to
check the version of perltidy and behave differently based on the version.

But according to
https://github.com/Perl-Critic/Perl-Critic/issues/925#issuecomment-1194737842
the issue should be fixed "in the most recent release of Perl::Tidy
(v20220613 or later)" due to a changed default value which seemingly
no more needs to the above mentioned code changes.

So please update perltidy to the most recent upstream release.

Regards, Axel
--
,''`. | Axel Beckert <a...@debian.org>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
0 new messages