C#: Move external api declarations to the library pack.

This commit is contained in:
Michael Nebel
2024-12-17 13:15:54 +01:00
parent 132dbd7517
commit a91c1dc715
12 changed files with 193 additions and 185 deletions

View File

@@ -1,16 +1,4 @@
private import csharp
// Use `semmle.code.csharp.telemetry.TestLibrary` instead.
deprecated module;
pragma[nomagic]
private predicate isTestNamespace(Namespace ns) {
ns.getFullName()
.matches([
"NUnit.Framework%", "Xunit%", "Microsoft.VisualStudio.TestTools.UnitTesting%", "Moq%"
])
}
/**
* A test library.
*/
class TestLibrary extends RefType {
TestLibrary() { isTestNamespace(this.getNamespace()) }
}
import semmle.code.csharp.telemetry.TestLibrary