C#: Only scaffold assemblies in overlay mode, only extract expressions when not scaffolding and only extract attributes when they are in source code in overlay mode.

This commit is contained in:
Michael Nebel
2025-11-03 10:58:52 +01:00
parent 1d2f1545d6
commit 504bb9c4a1
3 changed files with 15 additions and 1 deletions

View File

@@ -536,7 +536,9 @@ namespace Semmle.Extraction.CSharp
ShouldAddAssemblyTrapPrefix = shouldAddAssemblyTrapPrefix;
Compilation = c;
this.scope = scope;
OnlyScaffold = overlayInfo.IsOverlayMode && scope is SourceScope ss && overlayInfo.OnlyMakeScaffold(ss.SourceTree.FilePath);
OnlyScaffold = overlayInfo.IsOverlayMode && (
IsAssemblyScope
|| (scope is SourceScope ss && overlayInfo.OnlyMakeScaffold(ss.SourceTree.FilePath)));
}
public bool FromSource => scope is SourceScope;