Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Trying to get Perl::Critic working. It spews all kinds of lovely stuff from the command line, but I get no obvious output in Eclipse. Perhaps I am looking in the wrong place? It seems to run and then fail silently.
Various Version Information:
[Cygwin] Perl 5.8.8
I got the same problem with Active Perl. Where is the output of Perl::Critic put to?
I am seeing the same thing. I thought it would create a report or Provide TAGS in code for you to look at or something but I have not been able to get any of it to work.
Have you enabled it in Preferences/Perl EPIC/Perl::Critic and entered the correct path to the 'perlcritic' utility there?
See also: http://sourceforge.net/tracker/index.php?func=detail&aid=1870056&group_id=75859&atid=545274
Here is what I have:
I have enabled Critic
Here is the location for the PM file: d:\perl\site\lib\Bundle\Perl\Critic.pm
This is on my local system.
I also noticed that I get not response from the POD Checker. I have been checking my document with podchecker and even if I force an error I don't see any visual indicator in Eclipse. Perhaps I should start a new thread on this?
Did you enter the path to the 'perlcritic' script in the field "Custom location" in preferences when you enabled it? Are there any messages appearing in the Error Log view (or in file workspace/.metadata/.log)?
Like I said when I look at what I have now for the config is that Window->Prefs->EPIC->Critic under Custom Location I have d:\perl\site\lib\Bundle\Perl\Critic.pm
I don't know if this is correct or not.
I did not see the other script you mentioned anywhere. Perhaps that is part of the issue.
I looked in the Log as you suggested and did not see anything from Perl Critic in it.
I did find the perlutils folder that resides under org.epic.perleditor->perlutils
Which has several but none that I can tell work or are even being called right now.
Ok I validated the install of PERL Critic 1.0 on Windows.
It is installed at:
Volume in drive D is Data
Volume Serial Number is 8C52-520E
Directory of D:\perl\site\lib\Bundle\Perl
01/17/2008 01:59 PM <DIR> .
01/17/2008 01:59 PM <DIR> ..
01/17/2008 01:59 PM 1,685 Critic.pm
I wrote the little script:
my $file = shift;
my $critic = Perl::Critic->new();
my @violations = $critic->critique($file);
But it does not appear to pick up Critic as it gives me the @INC error. This is probably part of the reason other stuff is not working. Any suggestions besides going to linux?
the problem is that the options being passed to perlcritic no longer work for the latest version.
this could be worked around with a .perlcriticrc file in the project directory, however, epic expects the output of critic to match this:
which was a way to get output in a specific format for whatever version of critic was around when the functionality was added, much easier to part - and it does not appear there is a way to get critic to output in that format, even using the config file.
unfortunately i am under major deadlines and don't have time to investigate further, but thought it'd pass this along.
not to thread jack, but since perl developers seem to be hard to come by in nyc, if anyone is in the area and job hunting, let me know.
I managed to solve this problem in EPIC 0.5.44 under Windows XP with strawberry perl via:
* Set PERLCRITIC environment variable to a specific .perlcritic file, eg. c:\.perlcritic
* Populate .perlcritic with your desired perlcritic settings, eg.
theme = pbp
severity = 1
* Set Perl::Critic path in Eclipse to your relevant perlcritic installation (for me this was c:\strawberry\perl\bin\perlcritic)
* Restart Eclipse
This workaround is also working with:
* eclipse 3.4.1
* Activestate Perl 5.10
* Epic 0.6.25
I also managed to globally activate the perlcritic by adding
push @ARGV, "-1";
in the begining of perlcritic perl code.
The problem is that EPIC always launch perlcritic with the same three parameters, whatever you configure it in preferences window.
Here is a print of the parameters used by eclipse when launching perlcritic:
ARGV = D:\Dev\Projects\workspace\<projectfolder>\project.pl
ARGV = -verbose
ARGV = %f~|~%s~|~%l~|~%c~|~%m~|~%e
I'm having a similar problem.
There is no apparent output when Perl Critic is enabled and the binary's location is set properly. Using perlcritic from the command line works as expected.
If it helps, I'm running Mac OS 10.5.3, Perl 5.10.0 (installed from vanilla sources via mac ports), perlcritic 1.086 (via CPAN), EPIC 0.6.24, and Eclipse 3.3.2. Everything else works fine. I tried patspam's approach, and set the the 'PERLCRITIC' environment variable to a custom .perlcritic file with no luck.
If you need me to produce any logs, or if an EPIC developer would like VNC access to my machine to verify the problem, please let me know.
having same problem.
active perl 5.10.0
epic source 0.6.24
irrespective to this, nice job, guys, i like epic work!
I'm still having problems with this. I'm using Eclipse 3.5.2 now and am using Cygwin's Perl. I have perlcritic installed as /usr/local/bin/perlcritic and EPIC set to use C:/Cygwin/usr/local/bin/perlcritic. Perlcritic runs. I see output on stdout/stderr of the process running Eclipse. But I see the following in the .log file:
!ENTRY org.epic.perleditor 2 0 2010-06-01 20:10:25.460
!MESSAGE Perl::Critic violations.length == 0, output change?
It seems as if Eclipse is not seeing any of the output from perlcritic to parse.
Has anybody gotten this to work?
Where can I download perlcritic.exe for Windows? I looked everywhere. Please help!
Ignore my question. I did not install perl-critic correctly. And of course it is a .bat, not a .exe