Skip to content

Commit

Permalink
Merge pull request #16577 from tamasvajk/fix/adjust-compiler-arg-test
Browse files Browse the repository at this point in the history
C#: Adjust compiler argument integration test
  • Loading branch information
tamasvajk committed May 24, 2024
2 parents c743aba + 9aee2dc commit 8ae607c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
| 0 | /noconfig |
| 1 | /unsafe- |
| 2 | /checked- |
| 3 | /nowarn:1701,1702,1701,1702 |
| 4 | /fullpaths |
| 5 | /nostdlib+ |
| 6 | /errorreport:prompt |
| 7 | /warn:8 |
| 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 |
| 9 | /highentropyva+ |
| 10 | /nullable:enable |
| 11 | /reference:[...]/8.0.1/ref/net8.0/Microsoft.CSharp.dll |
| 12 | /reference:[...]/8.0.1/ref/net8.0/Microsoft.VisualBasic.Core.dll |
| 13 | /reference:[...]/8.0.1/ref/net8.0/Microsoft.VisualBasic.dll |
Expand Down Expand Up @@ -168,10 +173,24 @@
| 172 | /reference:[...]/8.0.1/ref/net8.0/System.Xml.XPath.XDocument.dll |
| 173 | /reference:[...]/8.0.1/ref/net8.0/WindowsBase.dll |
| 174 | /debug+ |
| 175 | /debug:portable |
| 176 | /filealign:512 |
| 177 | /generatedfilesout:obj/Debug/net8.0//generated |
| 178 | /optimize- |
| 179 | /out:obj/Debug/net8.0/test.dll |
| 180 | /refout:obj/Debug/net8.0/refint/test.dll |
| 181 | /target:exe |
| 182 | /warnaserror- |
| 183 | /utf8output |
| 184 | /deterministic+ |
| 185 | /sourcelink:obj/Debug/net8.0/test.sourcelink.json |
| 186 | /langversion:12.0 |
| 187 | /embed:Program.cs |
| 188 | /embed:obj/Debug/net8.0/test.GlobalUsings.g.cs |
| 189 | /embed:"obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs" |
| 190 | /embed:obj/Debug/net8.0/test.AssemblyInfo.cs |
| 191 | /analyzerconfig:/home/runner/work/semmle-code/semmle-code/.editorconfig |
| 192 | /analyzerconfig:obj/Debug/net8.0/test.GeneratedMSBuildEditorConfig.editorconfig |
| 193 | /analyzerconfig:[...]/8.0.101/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_8_default.globalconfig |
| 194 | /analyzer:[...]/8.0.101/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll |
| 195 | /analyzer:[...]/8.0.101/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll |
Expand All @@ -185,3 +204,4 @@
| 203 | obj/Debug/net8.0/test.GlobalUsings.g.cs |
| 204 | obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs |
| 205 | obj/Debug/net8.0/test.AssemblyInfo.cs |
| 206 | /warnaserror+:NU1605,SYSLIB0011 |
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import semmle.code.csharp.commons.Compilation

bindingset[arg]
private string normalize(string arg) {
not exists(arg.indexOf(":")) and result = arg
(not exists(arg.indexOf(":")) or not exists(arg.indexOf("/8.0"))) and
result = arg
or
exists(int i, int j |
i = arg.indexOf(":") and
Expand Down

0 comments on commit 8ae607c

Please sign in to comment.