Skip to content

Commit 3167343

Browse files
committed
Add test for missing Xamarin SDKs
1 parent 3ef3441 commit 3167343

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"attributes": {},
3+
"helpLinks": [],
4+
"internal": false,
5+
"location": {},
6+
"markdownMessage": "CodeQL was unable to build the following projects using .NET Core:\n- `test.csproj`\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).",
7+
"severity": "error",
8+
"source": {
9+
"extractorName": "csharp",
10+
"id": "csharp/autobuilder/dotnet-build-failure",
11+
"name": "Some projects or solutions failed to build using .NET Core"
12+
},
13+
"visibility": {
14+
"statusPage": true
15+
}
16+
}
17+
{
18+
"attributes": {},
19+
"helpLinks": [],
20+
"internal": false,
21+
"location": {},
22+
"markdownMessage": "CodeQL was unable to build the following projects using MSBuild:\n- `test.csproj`\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).",
23+
"severity": "error",
24+
"source": {
25+
"extractorName": "csharp",
26+
"id": "csharp/autobuilder/msbuild-build-failure",
27+
"name": "Some projects or solutions failed to build using MSBuild"
28+
},
29+
"visibility": {
30+
"statusPage": true
31+
}
32+
}
33+
{
34+
"attributes": {},
35+
"helpLinks": [],
36+
"internal": false,
37+
"location": {},
38+
"markdownMessage": "[Configure your workflow](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-xamarin-applications) for this SDK before running CodeQL.",
39+
"severity": "error",
40+
"source": {
41+
"extractorName": "csharp",
42+
"id": "csharp/autobuilder/missing-xamarin-ios-sdk",
43+
"name": "Missing Xamarin SDK for iOS"
44+
},
45+
"visibility": {
46+
"statusPage": true
47+
}
48+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net7.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
<LanguageTargets>$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets</LanguageTargets>
9+
</PropertyGroup>
10+
11+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from create_database_utils import *
2+
from diagnostics_test_utils import *
3+
4+
run_codeql_database_create([], db=None, lang="csharp", runFunction=runUnsuccessfully)
5+
check_diagnostics()

0 commit comments

Comments
 (0)