KE2: Start writing the actual TRAP files

This commit is contained in:
Ian Lynagh
2024-08-29 11:56:56 +01:00
parent 2c20072e88
commit 99161bcb1e
2 changed files with 5 additions and 9 deletions

View File

@@ -497,19 +497,18 @@ OLD: KE1
val trapFileWriter = getTrapFileWriter(compression, logger, checkTrapIdentical, trapFileName)
trapFileWriter.run { trapFileBW ->
TODO()
/*
OLD: KE1
// We want our comments to be the first thing in the file,
// so start off with a mere TrapWriter
// so start off with a PlainTrapWriter
val tw =
PlainTrapWriter(
loggerBase,
TrapLabelManager(),
trapFileBW,
fileTrapWriter.getDiagnosticTrapWriter()
fileDiagnosticTrapWriter.getDiagnosticTrapWriter()
)
tw.writeComment("Generated by the CodeQL Kotlin extractor for kotlin source code")
/*
OLD: KE1
tw.writeComment("Part of invocation $invocationTrapFile")
// Now elevate to a SourceFileTrapWriter, and populate the
// file information
@@ -523,7 +522,7 @@ OLD: KE1
primitiveTypeMapping,
pluginContext,
globalExtensionState,
fileTrapWriter.getDiagnosticTrapWriter()
fileDiagnosticTrapWriter.getDiagnosticTrapWriter()
)
val linesOfCode = LinesOfCode(logger, sftw, srcFile)
val fileExtractor =

View File

@@ -299,8 +299,6 @@ OLD: KE1
)
}
/*
OLD: KE1
/** A `PlainTrapWriter` has no additional context of its own. */
class PlainTrapWriter(
loggerBase: LoggerBase,
@@ -312,7 +310,6 @@ class PlainTrapWriter(
return dtw
}
}
*/
/**
* A `DiagnosticTrapWriter` is a TrapWriter that diagnostics can be written to; i.e. it has