Skip to content

Commit 9aee2dc

Browse files
committed
C#: Adjust compiler argument integration test
1 parent f5c654b commit 9aee2dc

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

csharp/ql/integration-tests/linux-only/compiler_args/CompilerArgs.expected

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
| 0 | /noconfig |
22
| 1 | /unsafe- |
33
| 2 | /checked- |
4+
| 3 | /nowarn:1701,1702,1701,1702 |
45
| 4 | /fullpaths |
56
| 5 | /nostdlib+ |
7+
| 6 | /errorreport:prompt |
8+
| 7 | /warn:8 |
9+
| 8 | /define:TRACE;DEBUG;NET;NET8_0;NETCOREAPP;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NET7_0_OR_GREATER;NET8_0_OR_GREATER;NETCOREAPP1_0_OR_GREATER;NETCOREAPP1_1_OR_GREATER;NETCOREAPP2_0_OR_GREATER;NETCOREAPP2_1_OR_GREATER;NETCOREAPP2_2_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER |
610
| 9 | /highentropyva+ |
11+
| 10 | /nullable:enable |
712
| 11 | /reference:[...]/8.0.1/ref/net8.0/Microsoft.CSharp.dll |
813
| 12 | /reference:[...]/8.0.1/ref/net8.0/Microsoft.VisualBasic.Core.dll |
914
| 13 | /reference:[...]/8.0.1/ref/net8.0/Microsoft.VisualBasic.dll |
@@ -168,10 +173,24 @@
168173
| 172 | /reference:[...]/8.0.1/ref/net8.0/System.Xml.XPath.XDocument.dll |
169174
| 173 | /reference:[...]/8.0.1/ref/net8.0/WindowsBase.dll |
170175
| 174 | /debug+ |
176+
| 175 | /debug:portable |
177+
| 176 | /filealign:512 |
178+
| 177 | /generatedfilesout:obj/Debug/net8.0//generated |
171179
| 178 | /optimize- |
180+
| 179 | /out:obj/Debug/net8.0/test.dll |
181+
| 180 | /refout:obj/Debug/net8.0/refint/test.dll |
182+
| 181 | /target:exe |
172183
| 182 | /warnaserror- |
173184
| 183 | /utf8output |
174185
| 184 | /deterministic+ |
186+
| 185 | /sourcelink:obj/Debug/net8.0/test.sourcelink.json |
187+
| 186 | /langversion:12.0 |
188+
| 187 | /embed:Program.cs |
189+
| 188 | /embed:obj/Debug/net8.0/test.GlobalUsings.g.cs |
190+
| 189 | /embed:"obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs" |
191+
| 190 | /embed:obj/Debug/net8.0/test.AssemblyInfo.cs |
192+
| 191 | /analyzerconfig:/home/runner/work/semmle-code/semmle-code/.editorconfig |
193+
| 192 | /analyzerconfig:obj/Debug/net8.0/test.GeneratedMSBuildEditorConfig.editorconfig |
175194
| 193 | /analyzerconfig:[...]/8.0.101/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_8_default.globalconfig |
176195
| 194 | /analyzer:[...]/8.0.101/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll |
177196
| 195 | /analyzer:[...]/8.0.101/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll |
@@ -185,3 +204,4 @@
185204
| 203 | obj/Debug/net8.0/test.GlobalUsings.g.cs |
186205
| 204 | obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs |
187206
| 205 | obj/Debug/net8.0/test.AssemblyInfo.cs |
207+
| 206 | /warnaserror+:NU1605,SYSLIB0011 |

csharp/ql/integration-tests/linux-only/compiler_args/CompilerArgs.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import semmle.code.csharp.commons.Compilation
33

44
bindingset[arg]
55
private string normalize(string arg) {
6-
not exists(arg.indexOf(":")) and result = arg
6+
(not exists(arg.indexOf(":")) or not exists(arg.indexOf("/8.0"))) and
7+
result = arg
78
or
89
exists(int i, int j |
910
i = arg.indexOf(":") and

0 commit comments

Comments
 (0)