Skip to content

Commit 166ce1b

Browse files
committed
C#: Add buildless integration test example including .slnx file.
1 parent 247d764 commit 166ce1b

File tree

9 files changed

+73
-0
lines changed

9 files changed

+73
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
| All NuGet feeds reachable | 1.0 |
2+
| Failed project restore with package source error | 0.0 |
3+
| Failed solution restore with package source error | 0.0 |
4+
| Inherited NuGet feed count | 1.0 |
5+
| NuGet feed responsiveness checked | 1.0 |
6+
| Project files on filesystem | 2.0 |
7+
| Reachable fallback NuGet feed count | 1.0 |
8+
| Resource extraction enabled | 0.0 |
9+
| Restored .NET framework variants | 1.0 |
10+
| Restored projects through solution files | 0.0 |
11+
| Solution files on filesystem | 0.0 |
12+
| Source files generated | 1.0 |
13+
| Source files on filesystem | 2.0 |
14+
| Successfully restored project files | 2.0 |
15+
| Successfully restored solution files | 0.0 |
16+
| Unresolved references | 0.0 |
17+
| UseWPF set | 0.0 |
18+
| UseWindowsForms set | 0.0 |
19+
| WebView extraction enabled | 1.0 |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import csharp
2+
import semmle.code.csharp.commons.Diagnostics
3+
4+
query predicate compilationInfo(string key, float value) {
5+
key != "Resolved references" and
6+
key != "Resolved assembly conflicts" and
7+
not key.matches(["Compiler diagnostic count for%", "Extractor message count for group%"]) and
8+
exists(Compilation c, string infoKey, string infoValue | infoValue = c.getInfo(infoKey) |
9+
key = infoKey and
10+
value = infoValue.toFloat()
11+
or
12+
not exists(infoValue.toFloat()) and
13+
key = infoKey + ": " + infoValue and
14+
value = 1
15+
)
16+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.100"
4+
}
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace mylib;
2+
3+
public class Class1
4+
{
5+
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
</Project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// See https://aka.ms/new-console-template for more information
2+
Console.WriteLine("Hello, World!");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net10.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
</Project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test(codeql, csharp):
2+
codeql.database.create(build_mode="none")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Solution>
2+
<Project Path="mylib/mylib.csproj" />
3+
<Project Path="proj/proj.csproj" />
4+
</Solution>

0 commit comments

Comments
 (0)