Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: perlcritic speedup

by powerman (Friar)
on Jan 25, 2012 at 08:24 UTC ( #949847=note: print w/ replies, xml ) Need Help??


in reply to Re: perlcritic speedup
in thread perlcritic speedup

Hmm. I was thinking about running perlcritic in background, but I didn't understood how this should work. Background perlcritic process will check some previous version of editing file, because I'll change it while perlcritic is running. So, when perlcritic will return it results, the line numbers in it output won't match current line numbers, some perlcritic messages won't be actual anymore, etc. This way perlcritic messages should confuse more than help.

It probably possible to try to calculate differences between these two file versions, and fix perlcritic messages (at least line numbers) before showing them. But I don't sure this can be implemented in reliable way, to avoid showing non-actual anymore perlcritic messages.


Comment on Re^2: perlcritic speedup
Re^3: perlcritic speedup
by jthalhammer (Friar) on Jan 25, 2012 at 09:25 UTC
      Yeah, I know about them. But I write code in many languages, not just in Perl, so I prefer to use plugins which behave in same way for any language (like syntastic, snipmate, viewdoc, tcomment, etc.) instead of language-specific plugins like perl-support.

        Well, flymake looks like exactly what you need:

        Flymake is a Vim plugin to perform on-the-fly syntax checking for the files being edited by using the external syntax checking tool (usually a compiler). It also highlights erroneous lines and displays associated error and warning messages. This plugin is a port of 'flymake-mode' for Emacs.

        Just substitute the world "perlcritic" wherever it says "compiler", and BAM! The trick is configuring the output of perlcritic to look like the output of a compiler. The formatting capabilities of the --verbose option are designed precisely for this situation.

        I know that people have successfully used Emacs' flymake-mode with perlcritic. So I gotta believe that you can make it work with vim-flymake. Let me know how it works out.

        Jeffrey Thalhammer
        Imaginative Software Systems

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://949847]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-08-29 05:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls