KE2: Only call analyze once, on the sourceModule

This commit is contained in:
Ian Lynagh
2024-10-02 16:29:41 +01:00
parent f63273a531
commit 5be65ffead

View File

@@ -214,12 +214,12 @@ fun doAnalysis(
val checkTrapIdentical = false // TODO
val psiFiles = session.modulesWithFiles.getValue(sourceModule)
var fileNumber = 0
val dump_psi = System.getenv("CODEQL_EXTRACTOR_JAVA_KOTLIN_DUMP") == "true"
for (psiFile in psiFiles) {
if (psiFile is KtFile) {
analyze(psiFile) {
analyze(sourceModule) {
val psiFiles = session.modulesWithFiles.getValue(sourceModule)
var fileNumber = 0
val dump_psi = System.getenv("CODEQL_EXTRACTOR_JAVA_KOTLIN_DUMP") == "true"
for (psiFile in psiFiles) {
if (psiFile is KtFile) {
if (dump_psi) {
val showWhitespaces = false
val showRanges = true
@@ -269,11 +269,11 @@ fun doAnalysis(
fileExtractionProblems.setNonRecoverableProblem()
*/
}
} else {
System.out.println("Warning: Not a KtFile")
}
fileNumber += 1
} else {
System.out.println("Warning: Not a KtFile")
}
fileNumber += 1
}
}