Hi,
I posted this on StackOverflow, but was recommended to reach out to the
mailing list. As well, the forums seem to be quite dead.
>From SO:
"I am trying to generate a PMD report by using a custom ruleset. The input
is a bunch of Apex classes in String format. Without outputting to a file,
I'd like to then parse the report contents directly (XML format) to create
a summary of violations, begin/end lines, priority, the rule name, and the
message attached. This is to be done on multiple bodies of Apex code,
adding to a report bean every time there is a violation.
I was trying to do this with SourceCodeProcessor, but couldn't figure out
what some of the required objects/arguments looked like, nor how they were
built. I still don't know how to make a RuleContext object property.
Any help is massively appreciated."
I was recommended by Johnco to pursue basically rewriting doPMD for my own
needs, however, I am having some trouble. Mostly, with creating a
RuleContext (not much documentation and my investigative skills are weak as
I am a beginner) and a listener for the report.
If anyone has any further insight, please let me know.
Also, please let me know if this is the right way to use this mailing list.
Thanks much.
--
Caleb Knox
Endeveran
|