Ryan Gustafson bd070a57be Refactor the LangaugeVersionHandlers to use an AbstractLanguageVersionHandler for common implementation.
Include the Document in the AST for the XML language.  For some unknown reason I had been excluding it (on purpose it seems).

Added an AbstractXmlRule for Java based Rule implementations for XML language, not horribly useful, but is consistent with other languages.  Also added AbstactDomXmlRule if one prefers to visit the DOM model.

Add the concept of ParserOptions.  These are given to the Parsers to influence the manner in which the AST is produced.  The XML and Ecmascript languages now both have parser options.  Feedback welcome, perhaps the XML options should be removed?

ParserOptions are exposed as properties on XPath and Java based rules for the XML and Ecmascript languages.  In the future, I'll change the PMD class to produce a separate AST for each unique ParserOption option.  That requires dividing the Rules into equivalence classes based upon their ParserOptions (i.e. interrogation of RuleSets and division of labor).  For now, only the LanguageVersion default ParserOptions will be used, so you cannot practically use these features on Rules unless you hack the code a bit.  If you're using the Parsers directly, you can take advantage of this immediately.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7030 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-13 02:43:27 +00:00
2009-10-17 13:41:32 +00:00
2009-10-17 13:32:56 +00:00
Description
An extensible multilanguage static code analyzer.
Apache-2.0 510 MiB
Languages
Java 75.5%
Apex 9.7%
Kotlin 9.1%
ANTLR 2.7%
PLSQL 1%
Other 1.8%