Open mary-georgiou-sonarsource opened 2 years ago
~It might be possible to retrieve from Roslyn what usings are in scope at the syntax node that is being analyzed.~
~Otherwise, there might be a big performance impact~
EDIT: Global using retrieval will be available from MSBuild version 17.3 onwards through this API, exposed via semanticModel.GetImportScopes
.
Since the semantic model will be called, we have to consider the potential performance regression but running tests.
Description
No issue is raised if SQL related namespaces are imported through global using directives
Repro steps
Expected behavior
Issue is raised.
Actual behavior
No issue is raised.
Related information
How?
Global using retrieval will be available from MSBuild version 17.3 onwards through this API, exposed via
semanticModel.GetImportScopes
.Since the semantic model will be called, we have to consider the potential performance regression but running tests.