Skip to content

Commit 2780d9a

Browse files
committed
Merge branch 'main' into optionals2
2 parents c8630bb + ac54da7 commit 2780d9a

File tree

208 files changed

+16279
-3065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+16279
-3065
lines changed

.github/workflows/compile-queries.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,16 @@ jobs:
5656
# do full compile if running on main - this populates the cache
5757
if : ${{ github.event_name != 'pull_request' }}
5858
shell: bash
59-
run: codeql query compile -j0 */ql/src --keep-going --warnings=error
59+
run: |
60+
# Move all the existing cache into another folder, so we only preserve the cache for the current queries.
61+
mkdir -p ${COMBINED_CACHE_DIR}
62+
rm */ql/src/.cache/{lock,size}
63+
# copy the contents of the .cache folders into the combined cache folder.
64+
cp -r */ql/src/.cache/* ${COMBINED_CACHE_DIR}/
65+
# clean up the .cache folders
66+
rm -rf */ql/src/.cache/*
67+
68+
# compile the queries
69+
codeql query compile -j0 */ql/src --keep-going --warnings=error --compilation-cache ${COMBINED_CACHE_DIR}
70+
env:
71+
COMBINED_CACHE_DIR: ${{ github.workspace }}/compilation-dir

cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
<ItemGroup>
1212
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
1313
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
14-
<PackageReference Include="xunit" Version="2.4.1" />
15-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
14+
<PackageReference Include="xunit" Version="2.4.2" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1818
</PackageReference>
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
1920
</ItemGroup>
2021

2122
<ItemGroup>

cpp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.Build" Version="16.11.0" />
20+
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/Semmle.Autobuild.CSharp.Tests.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88
<ItemGroup>
9-
<PackageReference Include="System.IO.FileSystem" Version="4.3.0"/>
10-
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0"/>
11-
<PackageReference Include="xunit" Version="2.4.1"/>
12-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
9+
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
10+
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
11+
<PackageReference Include="xunit" Version="2.4.2" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
1313
<PrivateAssets>all</PrivateAssets>
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1515
</PackageReference>
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
1717
</ItemGroup>
1818
<ItemGroup>
19-
<ProjectReference Include="..\Semmle.Autobuild.CSharp\Semmle.Autobuild.CSharp.csproj"/>
20-
<ProjectReference Include="..\Semmle.Autobuild.Shared\Semmle.Autobuild.Shared.csproj"/>
19+
<ProjectReference Include="..\Semmle.Autobuild.CSharp\Semmle.Autobuild.CSharp.csproj" />
20+
<ProjectReference Include="..\Semmle.Autobuild.Shared\Semmle.Autobuild.Shared.csproj" />
2121
</ItemGroup>
2222
</Project>

csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
<Nullable>enable</Nullable>
1212
</PropertyGroup>
1313
<ItemGroup>
14-
<Folder Include="Properties\"/>
14+
<Folder Include="Properties\" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.Build" Version="16.11.0"/>
18-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
17+
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
18+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
1919
</ItemGroup>
2020
<ItemGroup>
21-
<ProjectReference Include="..\..\extractor\Semmle.Util\Semmle.Util.csproj"/>
22-
<ProjectReference Include="..\..\extractor\Semmle.Extraction.CSharp\Semmle.Extraction.CSharp.csproj"/>
23-
<ProjectReference Include="..\Semmle.Autobuild.Shared\Semmle.Autobuild.Shared.csproj"/>
21+
<ProjectReference Include="..\..\extractor\Semmle.Util\Semmle.Util.csproj" />
22+
<ProjectReference Include="..\..\extractor\Semmle.Extraction.CSharp\Semmle.Extraction.CSharp.csproj" />
23+
<ProjectReference Include="..\Semmle.Autobuild.Shared\Semmle.Autobuild.Shared.csproj" />
2424
</ItemGroup>
2525
</Project>

csharp/autobuilder/Semmle.Autobuild.Shared/Semmle.Autobuild.Shared.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<Nullable>enable</Nullable>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<Folder Include="Properties\"/>
11+
<Folder Include="Properties\" />
1212
</ItemGroup>
1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Build" Version="16.11.0"/>
14+
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<ProjectReference Include="..\..\extractor\Semmle.Util\Semmle.Util.csproj"/>
17+
<ProjectReference Include="..\..\extractor\Semmle.Util\Semmle.Util.csproj" />
1818
</ItemGroup>
1919
</Project>

csharp/extractor/Semmle.Extraction.CIL/Semmle.Extraction.CIL.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
@@ -24,7 +24,7 @@
2424
</ItemGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="Microsoft.DiaSymReader" Version="1.3.0" />
27+
<PackageReference Include="Microsoft.DiaSymReader" Version="1.4.0" />
2828
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.7.0" />
2929
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="1.6.0"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3030
<PrivateAssets>all</PrivateAssets>

csharp/extractor/Semmle.Extraction.CSharp.Standalone/Semmle.Extraction.CSharp.Standalone.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
<Nullable>enable</Nullable>
1313
</PropertyGroup>
1414
<ItemGroup>
15-
<ProjectReference Include="..\Semmle.Extraction.CSharp\Semmle.Extraction.CSharp.csproj"/>
16-
<ProjectReference Include="..\Semmle.Util\Semmle.Util.csproj"/>
15+
<ProjectReference Include="..\Semmle.Extraction.CSharp\Semmle.Extraction.CSharp.csproj" />
16+
<ProjectReference Include="..\Semmle.Util\Semmle.Util.csproj" />
1717
</ItemGroup>
1818
<ItemGroup>
19-
<Folder Include="Properties\"/>
19+
<Folder Include="Properties\" />
2020
</ItemGroup>
2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.Build" Version="16.11.0"/>
23-
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0"/>
24-
<PackageReference Include="System.Net.Primitives" Version="4.3.1"/>
25-
<PackageReference Include="System.Security.Principal" Version="4.3.0"/>
26-
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0"/>
22+
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
23+
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
24+
<PackageReference Include="System.Net.Primitives" Version="4.3.1" />
25+
<PackageReference Include="System.Security.Principal" Version="4.3.0" />
26+
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0" />
2727
</ItemGroup>
2828
</Project>

csharp/extractor/Semmle.Extraction.CSharp/Entities/UserOperator.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Microsoft.CodeAnalysis.CSharp.Syntax;
33
using System.IO;
44
using System.Linq;
5+
using System.Text.RegularExpressions;
56

67
namespace Semmle.Extraction.CSharp.Entities
78
{
@@ -162,6 +163,13 @@ public static bool OperatorSymbol(string methodName, out string operatorName)
162163
operatorName = "false";
163164
break;
164165
default:
166+
var match = Regex.Match(methodName, "^op_Checked(.*)$");
167+
if (match.Success)
168+
{
169+
OperatorSymbol("op_" + match.Groups[1], out var uncheckedName);
170+
operatorName = "checked " + uncheckedName;
171+
break;
172+
}
165173
operatorName = methodName;
166174
success = false;
167175
break;

csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
<Nullable>enable</Nullable>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<ProjectReference Include="..\Semmle.Extraction.CIL\Semmle.Extraction.CIL.csproj"/>
14-
<ProjectReference Include="..\Semmle.Extraction\Semmle.Extraction.csproj"/>
15-
<ProjectReference Include="..\Semmle.Util\Semmle.Util.csproj"/>
13+
<ProjectReference Include="..\Semmle.Extraction.CIL\Semmle.Extraction.CIL.csproj" />
14+
<ProjectReference Include="..\Semmle.Extraction\Semmle.Extraction.csproj" />
15+
<ProjectReference Include="..\Semmle.Util\Semmle.Util.csproj" />
1616
</ItemGroup>
1717
<ItemGroup>
18-
<Folder Include="Properties\"/>
18+
<Folder Include="Properties\" />
1919
</ItemGroup>
2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1"/>
22-
<PackageReference Include="Microsoft.Build" Version="16.11.0"/>
21+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
22+
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
2323
</ItemGroup>
2424
</Project>

0 commit comments

Comments
 (0)