mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
C#: Add logging for source file parsing
This commit is contained in:
@@ -284,9 +284,14 @@ namespace Semmle.Extraction.CSharp
|
||||
try
|
||||
{
|
||||
using var file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
var st = CSharpSyntaxTree.ParseText(SourceText.From(file, encoding), parseOptions, path);
|
||||
analyser.Logger.Log(Severity.Trace, $"Parsing source file: '{path}'");
|
||||
var tree = CSharpSyntaxTree.ParseText(SourceText.From(file, encoding), parseOptions, path);
|
||||
analyser.Logger.Log(Severity.Trace, $"Source file parsed: '{path}'");
|
||||
|
||||
lock (ret)
|
||||
ret.Add(st);
|
||||
{
|
||||
ret.Add(tree);
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user