title: PL/SQL pre-compile and Code Quality checks in an automated build environment?
body: <p>We build software using Hudson and Maven. We have C#, java and last, but not least PL/SQL sources (sprocs, packages, DDL, crud)</p>
  <p>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.</p>
  <h3>Requirements</h3>
  <p>There are a couple of things we wan't to test in the following priority:</p>
  <ol>
  <li>Are the sources valid, hence &quot;compilable&quot;?</li>
  <li>For packages, with respect to a certain database, would they compile?</li>
  <li>Code Quality: Do we have code flaws like duplicates, too complex methods or other violations to a defined set of rules?</li>
  </ol>
  <p>Also,</p>
  <ul>
  <li>the tool must run head-less (commandline, ant, ...)</li>
  <li>we want to do analysis on a partial code base (changed sources only)</li>
  </ul>
  <h3>Tools</h3>
  <p>We did a little research and found the following tools that could potencially help:</p>
  <ul>
  <li><strong><a href="http://www.castsoftware.com/Product/Application-Intelligence-Platform.aspx" rel="nofollow noreferrer">Cast Application Intelligence Platform (AIP)</a>:</strong> Seems to be a server that grasps information about &quot;anything&quot;. Couldn't find a console version that would export in readable format.</li>
  <li><strong><a href="http://www.toadsoft.com/toad_oracle.htm" rel="nofollow noreferrer">Toad for Oracle</a>:</strong> The Professional version is said to include something called Xpert validates a set of rules against a code base.</li>
  <li><strong><a href="http://www.sonarsource.com" rel="nofollow noreferrer">Sonar</a> + <a href="http://www.sonarsource.com/plugins/plugin-plsql/" rel="nofollow noreferrer">PL/SQL-Plugin</a>:</strong> Uses Toad for Oracle to display code-health the sonar-way. This is for browsing the current state of the code base.</li>
  <li><strong><a href="http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html?Home=PLSQLTools" rel="nofollow noreferrer">Semantic Designs DMSToolkit</a>:</strong> Quite general analysis of source code base. Commandline available?</li>
  <li><strong><a href="http://www.semanticdesigns.com/Products/Clone/index.html?Home=PLSQLTools" rel="nofollow noreferrer">Semantic Designs Clones Detector</a>:</strong> Detects clones. But also via command line?</li>
  <li><strong><a href="http://www.fortify.com/products/detect/in_development.jsp" rel="nofollow noreferrer">Fortify Source Code Analyzer</a>:</strong> Seems to be focussed on security issues. But maybe it is extensible? <em><a href="http://products.enterpriseitplanet.com/security/security/1101145596.html" rel="nofollow noreferrer">more...</a></em></li>
  </ul>
  <p>So far, Toad for Oracle together with Sonar seems to be an elegant solution. But may be we are missing something here?</p>
  <p>Any ideas? Other products? Experiences?</p>
  <h3>Related Questions on SO:</h3>
  <ul>
  <li><a href="https://stackoverflow.com/questions/531430/any-static-code-analysis-tools-for-stored-procedures">Any Static Code Analysis Tools for Stored Procedures?</a></li>
  <li><a href="https://stackoverflow.com/questions/839707/any-code-quality-tool-for-pl-sql">https://stackoverflow.com/questions/839707/any-code-quality-tool-for-pl-sql</a></li>
  <li><a href="https://stackoverflow.com/questions/956104/is-there-a-static-analysis-tool-for-python-ruby-sql-cobol-perl-and-pl-sql">Is there a static analysis tool for Python, Ruby, Sql, Cobol, Perl, and PL/SQL?</a></li>
  </ul>