mirror of
https://github.com/github/codeql.git
synced 2026-05-22 15:17:09 +02:00
KE2: Emit truncated diagnostic info
This commit is contained in:
@@ -141,9 +141,9 @@ OLD: KE1
|
||||
val globalExtensionState = KotlinExtractorGlobalState()
|
||||
*/
|
||||
doAnalysis(compression, trapDir, srcDir, loggerBase, dtw, compilation, invocationExtractionProblems, kotlinArgs)
|
||||
loggerBase.printLimitedDiagnosticCounts(dtw)
|
||||
/*
|
||||
OLD: KE1
|
||||
loggerBase.printLimitedDiagnosticCounts(tw)
|
||||
logPeakMemoryUsage(logger, "after extractor")
|
||||
*/
|
||||
logger.info("Extraction completed")
|
||||
|
||||
@@ -278,22 +278,19 @@ class LoggerBase(val diagnosticCounter: DiagnosticCounter): BasicLogger {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
OLD: KE1
|
||||
fun printLimitedDiagnosticCounts(dtw: DiagnosticTrapWriter) {
|
||||
for ((caller, info) in diagnosticCounter.diagnosticInfo) {
|
||||
val severity = info.first
|
||||
val count = info.second
|
||||
for ((caller, count) in diagnosticCounter.diagnosticInfo) {
|
||||
val callDescription = caller.first
|
||||
val severity = caller.second
|
||||
if (count >= diagnosticCounter.diagnosticLimit) {
|
||||
val message =
|
||||
"Total of $count diagnostics (reached limit of ${diagnosticCounter.diagnosticLimit}) from $caller."
|
||||
if (verbosity >= 1) {
|
||||
emitDiagnostic(dtw, severity, "Limit", message, message, null, dtw.unknownLocation)
|
||||
emitDiagnostic(dtw, null, severity, "Limit", message, message, null, dtw.unknownLocation)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
override fun flush() {
|
||||
logStream.flush()
|
||||
|
||||
Reference in New Issue
Block a user