PL/SQL pre-compile and Code Quality checks in an automated build environment?

Lars Corneliussen picture Lars Corneliussen · Jun 10, 2010 · Viewed 8.4k times · Source

We build software using Hudson and Maven. We have C#, java and last, but not least PL/SQL sources (sprocs, packages, DDL, crud)

For C# and Java we do unit tests and code analysis, but we don't really know the health of our PL/SQL sources before we actually publish them to the target database.

Requirements

There are a couple of things we wan't to test in the following priority:

  1. Are the sources valid, hence "compilable"?
  2. For packages, with respect to a certain database, would they compile?
  3. Code Quality: Do we have code flaws like duplicates, too complex methods or other violations to a defined set of rules?

Also,

  • the tool must run head-less (commandline, ant, ...)
  • we want to do analysis on a partial code base (changed sources only)

Tools

We did a little research and found the following tools that could potencially help:

So far, Toad for Oracle together with Sonar seems to be an elegant solution. But may be we are missing something here?

Any ideas? Other products? Experiences?

Related Questions on SO:

Answer

Hanno picture Hanno · Aug 13, 2010

I think that this blog describes the needed process:

http://www.theserverlabs.com/blog/?p=435

Please check and let me know what you think about it.