Skip to content

Commit 0cb3b7b

Browse files
committed
C#: Address review comments.
1 parent 6bc15bc commit 0cb3b7b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Extractor/CompilerVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public CompilerVersion(Options options)
7575
}
7676

7777
// If csc is specified as compiler name, then attempt to read the version information from csc.dll
78-
var compilerBinaryName = SpecifiedCompiler.EndsWith("csc") ? $"{SpecifiedCompiler}.dll" : SpecifiedCompiler;
78+
var compilerBinaryName = Path.GetFileName(SpecifiedCompiler) == "csc" ? $"{SpecifiedCompiler}.dll" : SpecifiedCompiler;
7979
var versionInfo = FileVersionInfo.GetVersionInfo(compilerBinaryName);
8080
if (!knownCompilerNames.TryGetValue(versionInfo.OriginalFilename ?? string.Empty, out var vendor))
8181
{

csharp/ql/lib/semmle/code/csharp/Callable.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ private import semmle.code.csharp.ExprOrStmtParent
1313
private import semmle.code.csharp.metrics.Complexity
1414
private import TypeRef
1515

16+
private predicate myTest(Callable c) { c.fromSource() }
17+
1618
/**
1719
* An element that can be called.
1820
*

0 commit comments

Comments
 (0)