Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Dec 12, 2023
1 parent b84aa69 commit ccddf3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dosai/Dosai.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private static List<Namespace> GetSourceNamespaces(string path)
var extn = Path.GetExtension(sourceFilePath);
Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax? csRoot = null;
Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax? vbRoot = null;

if (extn.Equals(Constants.CSharpSourceExtension))
{
var syntaxTree = (CSharpSyntaxTree)CSharpSyntaxTree.ParseText(fileContent);
Expand Down Expand Up @@ -410,7 +410,7 @@ private static (List<Method>, List<Dependency>, List<MethodCalls>) GetSourceMeth
{
foreach(var importDirective in vbImportsDirectives)
{
var name = importDirective.Name?.ToFullString();
var name = importDirective.Name?.ToFullString().Trim();
var namespaceType = importDirective.Alias?.ToFullString();
var location = importDirective.GetLocation().GetLineSpan().StartLinePosition;
var lineNumber = location.Line + 1;
Expand Down Expand Up @@ -535,7 +535,7 @@ private static void TrackVBMethodCall(Microsoft.CodeAnalysis.VisualBasic.Syntax.
var lineNumber = location.Line + 1;
var columnNumber = location.Character + 1;
var fullName = callExpression.ToFullString();
var callArgsTypes = callArguments.Arguments.Select(a => a.ToFullString()).ToList();
var callArgsTypes = callArguments?.Arguments.Select(a => a.ToFullString()).ToList();
var exprInfo = model.GetSymbolInfo(callExpression);
var calledMethod = string.Empty;
var isInMetadata = false;
Expand Down
2 changes: 1 addition & 1 deletion Dosai/Dosai.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<Version>0.1.0</Version>
<Version>0.1.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit ccddf3b

Please sign in to comment.