chore: Introduce Qodana static analysis configuration and apply minor code formatting and C# 12 collection expressions.
This commit is contained in:
@@ -36,7 +36,7 @@ public class HistoryManager : IHistoryManager
|
||||
};
|
||||
|
||||
var json = JsonSerializer.Serialize(entry, CompactJsonSerializerContext.Default.HistoryEntry);
|
||||
|
||||
|
||||
// Thread-safe append
|
||||
lock (HistoryFile)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public class HistoryManager : IHistoryManager
|
||||
if (string.IsNullOrWhiteSpace(line)) continue;
|
||||
if (!line.Trim().StartsWith("{") || !line.Trim().EndsWith("}")) continue; // Skip malformed old multiline json entries
|
||||
|
||||
try
|
||||
try
|
||||
{
|
||||
var entry = JsonSerializer.Deserialize(line, CompactJsonSerializerContext.Default.HistoryEntry);
|
||||
if (entry != null)
|
||||
@@ -75,7 +75,7 @@ public class HistoryManager : IHistoryManager
|
||||
entries.Add(entry);
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch
|
||||
{
|
||||
// Skip entry if deserialization fails
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user