9

I am looking for a static analysis tool for Python, Ruby, Sql, Cobol, Perl, PL/SQL, SQL similar to find bugs and check style. I am looking for calculating the line count, identify bugs during the development, and enforcing coding standard.

brian d foy
  • 129,424
  • 31
  • 207
  • 592

6 Answers6

10

Perl has Perl::Critic (and perlcritic.com)

Chas. Owens
  • 64,182
  • 22
  • 135
  • 226
  • It worked pretty well for me; it found some archaisms in my code which I’d been copy/pasting since before they were archaic. – Flash Sheridan Jun 06 '09 at 18:02
  • @Flash - curious as to what they were? – DVK Apr 28 '10 at 10:30
  • Funny you should ask yesterday; I think they were violations at Palm, from my BBEdit Perl stationery, of “128. Use … the three-argument form of open. This variant was introduced in Perl 5.6 and is more robust that the older two- argument version, which is susceptible to very rare, but subtle, failures.” I’d originally written the code in the last millennium; nothing is so permanent as sample code… – Flash Sheridan Apr 29 '10 at 15:02
4

I use PyChecker and pylint as Python code checkers. However it seems that they get buggy when you use some modules (e.g., socket or pygame, IIRC).

Bastien Léonard
  • 60,478
  • 20
  • 78
  • 95
2

For Ruby, you're probably best served looking at this previous SO question:

https://stackoverflow.com/questions/286564/can-anyone-recommend-a-ruby-source-code-analyzer-something-like-pylint

which seems pretty thorough.

Community
  • 1
  • 1
Mike Woodhouse
  • 51,832
  • 12
  • 88
  • 127
0

See various static analysis tools from Semantic Designs.

These cover standard metrics for Java, C# and COBOL. There are also tools to detect duplicate code (clones) for many languages, including Python, Java, PL/SQL (from your list).

Finally, there is a style checker (coding standards checks) for COBOL (with optional Eclipse plugin) that offers refactoring support to fix some of the style errors.

Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
0

I use Pylint for Python which was nicely integrated into Komodo by Brandon Corfman (if ActiveState's Komodo is your thing).

Rob Hruska
  • 118,520
  • 32
  • 167
  • 192
pboucher
  • 352
  • 1
  • 10
0

Sonar has a PL/SQL plugin that is based on Toad CodeXpert code analyzer.