Skip to content

Commit

Permalink
File rooting bugfixes + VS 19 json fixes (#606)
Browse files Browse the repository at this point in the history
* working state in 19

* update ver stamp

* replacing strings to allow for arbitrarily opened files to be mapped to their relative paths

* removing vscode folder

* updating stamp and re running flaky test

* modifying to pass tests, not properly wrapped
  • Loading branch information
edkazcarlson-ms authored Oct 5, 2023
1 parent 6c62d3f commit 2a38c61
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ private string ResolvePathThroughOpenFiles(string relativeFilePath)
if (window.Document != null)
{
string fileName = window.Document.FullName;
if (fileName.EndsWith(relativeFilePath, StringComparison.OrdinalIgnoreCase))
if (fileName.EndsWith(relativeFilePath.Replace('/', Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase))
{
return window.Document.FullName;
}
Expand Down
14 changes: 12 additions & 2 deletions src/Sarif.Viewer.VisualStudio.Core/ErrorList/ColumnFilterer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ private IWpfTableControl ErrorListTableControl
{
get
{
ThreadHelper.ThrowIfNotOnUIThread();
if (!SarifViewerPackage.IsUnitTesting)
{
#pragma warning disable VSTHRD108 // Assert thread affinity unconditionally
ThreadHelper.ThrowIfNotOnUIThread();
#pragma warning restore VSTHRD108
}

if (this.errorListTableControl == null)
{
Expand All @@ -42,7 +47,12 @@ private IWpfTableControl ErrorListTableControl

public void FilterOut(string columnName, string filteredValue)
{
ThreadHelper.ThrowIfNotOnUIThread();
if (!SarifViewerPackage.IsUnitTesting)
{
#pragma warning disable VSTHRD108 // Assert thread affinity unconditionally
ThreadHelper.ThrowIfNotOnUIThread();
#pragma warning restore VSTHRD108
}

var filteredColumnValue = new FilteredColumnValue(columnName, filteredValue);
if (!this.filteredColumnValues.Contains(filteredColumnValue))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public DevCanvasResultSourceService(
public System.Threading.Tasks.Task InitializeAsync()
{
// TODO: Remove this when merging into main.
DevCanvasTracer.WriteLine($"Initializing {nameof(DevCanvasResultSourceService)}. Version 9/7");
DevCanvasTracer.WriteLine($"Initializing {nameof(DevCanvasResultSourceService)}. Version 10/5");
string userName = (string)Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\VSCommon\\ConnectedUser\\IdeUserV4\\Cache", "EmailAddress", null);

if (string.IsNullOrWhiteSpace(userName) || !userName.EndsWith("@microsoft.com"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<Version>16.0.206</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="Sarif.Sdk">
<Version>2.4.15</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<Version>16.0.206</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="Octokit">
<Version>0.51.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Sarif.Converters">
<Version>2.4.15</Version>
</PackageReference>
Expand Down

0 comments on commit 2a38c61

Please sign in to comment.