ActiveState Community

PerlCritic false positive

Posted by hast on 2009-06-25 00:01

Hi

When i enable PerlCritic in Komodo, all my package (pm) files get the warning: 'Package declaration must match filename.' (se screenshot in attachment)

When running through the PerlCritic GUI from the PDK, this warning does not show - and I'm using the same PerlCritic profile.

Any ideas?

Regards, Hans

AttachmentSize
25-06-2009 08-44-14.jpg85.89 KB

ericp | Thu, 2009-06-25 10:04

Please let me know if you tried this in 5.1.4, or if the
upgrade doesn't fix it.

Regards,
Eric

hast | Thu, 2009-06-25 23:53

Nope, the problem is still there, unfortunately.

/Hans

ericp | Fri, 2009-06-26 09:32

When we do a syntax-check in Komodo, we save the buffer in a
temporary file, as the syntax checker expects its input to be
on disk. We wouldn't want to force a save on the file
you're working on, so we write the contents to a temporary
file, and evaluate that.

Komodo should be patching the buffer with this line next
to any unmatched package statements:

page ...; ##no critic(RequireFilenameMatchesPackage)

This was done in response to bug http://bugs.activestate.com/show_bug.cgi?id=82755

We fixed this only on our "trunk", and the fix never was part
of the 5.1.4 release. You can get the fix by upgrading to a
5.2.0 pre-release nightly build, at
http://downloads.activestate.com/Komodo/nightly/

Regards,
Eric

hast | Tue, 2009-06-30 03:55

The 5.2 version fixed it.

ericp | Tue, 2009-06-30 10:25

- Eric