Ahmed Mourad
12/12/2020, 1:20 AMgenerateAllViolations
returns some code (String) that needs to be generated and that is referenced and used by other parts of the user's codebase.
internal fun Meta.violationsGenerator(): AnalysisHandler = analysis(
doAnalysis = Noop.nullable7<AnalysisResult>(),
analysisCompleted = { _, _, bindingTrace, _ ->
// this returns the code to generate
val (location, code) = generateAllViolations(bindingTrace)
null
}
)
raulraja
12/12/2020, 5:39 PManalysysCompleted
or change your code to depend instead on a quote for the File that returns the Files you want to generate to Transform.newSourcesraulraja
12/12/2020, 5:40 PMraulraja
12/12/2020, 5:41 PMraulraja
12/12/2020, 5:45 PMnull
you should there return https://github.com/JetBrains/kotlin/blob/1a377069dd860be18482d1d3c67302ac57cfbce5/[…]er/frontend/src/org/jetbrains/kotlin/analyzer/AnalysisResult.ktraulraja
12/12/2020, 5:45 PMAhmed Mourad
12/13/2020, 1:08 AMraulraja
12/13/2020, 3:13 AMraulraja
12/13/2020, 3:14 AMAhmed Mourad
12/13/2020, 7:00 AM