When using CodeNarc, two situations can occur:
A report is provided, we then have to parse the codenarc report to extract reported issues.
If no report is provided, we generate a report using a runner and an analyzer provided by the CodeNarc API, which will write the results in an xml file. Finally, we proceed as in 1. by parsing the results to extract issues.
In the second case, it should be possible to totally avoid the file creation/parsing phase by implementing our own analyzer, extending the abstract class org.codenarc.analyzer.AbstractSourceAnalyzer from the CodeNarc API.