Skip to content

Commit

Permalink
SLVS-1622 Receive server taint vulnerabilities updates via SLCore (#5828
Browse files Browse the repository at this point in the history
  • Loading branch information
georgii-borovinskikh-sonarsource committed Nov 20, 2024
1 parent 9ba426c commit 6e80ab2
Show file tree
Hide file tree
Showing 20 changed files with 614 additions and 281 deletions.
1 change: 1 addition & 0 deletions src/CFamily.UnitTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,7 @@
"type": "Project",
"dependencies": {
"SonarLint.VisualStudio.ConnectedMode": "[1.0.0, )",
"SonarLint.VisualStudio.IssueVisualization.Security": "[1.0.0, )",
"SonarLint.VisualStudio.SLCore": "[1.0.0, )"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void ClientConstants_ShouldBeExpected()
public void FeatureFlags_ShouldBeExpected()
{
var testSubject = CreateTestSubject();
var expectedFeatureFlags = new FeatureFlagsDto(true, true, true, true, false, false, true, true, true);
var expectedFeatureFlags = new FeatureFlagsDto(true, true, true, true, true, false, true, true, true);
var actual = testSubject.FeatureFlags;

actual.Should().BeEquivalentTo(expectedFeatureFlags);
Expand Down
1 change: 1 addition & 0 deletions src/Integration.Vsix.UnitTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,7 @@
"type": "Project",
"dependencies": {
"SonarLint.VisualStudio.ConnectedMode": "[1.0.0, )",
"SonarLint.VisualStudio.IssueVisualization.Security": "[1.0.0, )",
"SonarLint.VisualStudio.SLCore": "[1.0.0, )"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
################################
# Assembly references report
# Report date/time: 2024-10-23T13:47:06.0805083Z
# Report date/time: 2024-11-12T14:45:18.4864870Z
################################
#
# Generated by Devtility CheckAsmRefs v0.11.0.223
Expand Down Expand Up @@ -442,11 +442,12 @@ Referenced assemblies:
- 'SonarLint.VisualStudio.ConnectedMode, Version=8.7.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244'
- 'SonarLint.VisualStudio.Core, Version=8.7.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244'
- 'SonarLint.VisualStudio.IssueVisualization, Version=8.7.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244'
- 'SonarLint.VisualStudio.IssueVisualization.Security, Version=8.7.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244'
- 'SonarLint.VisualStudio.SLCore, Version=8.7.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244'
- 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
- 'System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
- 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
# Number of references: 8
# Number of references: 9

---
Assembly: 'SonarQube.Client, Version=8.7.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
################################
# Assembly references report
# Report date/time: 2024-10-23T13:47:06.0805083Z
# Report date/time: 2024-11-12T14:45:18.4864870Z
################################
#
# Generated by Devtility CheckAsmRefs v0.11.0.223
Expand Down Expand Up @@ -442,11 +442,12 @@ Referenced assemblies:
- 'SonarLint.VisualStudio.ConnectedMode, Version=8.7.0.0, Culture=neutral, PublicKeyToken=null'
- 'SonarLint.VisualStudio.Core, Version=8.7.0.0, Culture=neutral, PublicKeyToken=null'
- 'SonarLint.VisualStudio.IssueVisualization, Version=8.7.0.0, Culture=neutral, PublicKeyToken=null'
- 'SonarLint.VisualStudio.IssueVisualization.Security, Version=8.7.0.0, Culture=neutral, PublicKeyToken=null'
- 'SonarLint.VisualStudio.SLCore, Version=8.7.0.0, Culture=neutral, PublicKeyToken=null'
- 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
- 'System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
- 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
# Number of references: 8
# Number of references: 9

---
Assembly: 'SonarQube.Client, Version=8.7.0.0, Culture=neutral, PublicKeyToken=null'
Expand Down
1 change: 1 addition & 0 deletions src/Integration.Vsix/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,7 @@
"type": "Project",
"dependencies": {
"SonarLint.VisualStudio.ConnectedMode": "[1.0.0, )",
"SonarLint.VisualStudio.IssueVisualization.Security": "[1.0.0, )",
"SonarLint.VisualStudio.SLCore": "[1.0.0, )"
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/Integration/SLCore/SLCoreConstantsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public SLCoreConstantsProvider(IVsInfoProvider vsInfoProvider)

public ClientConstantsDto ClientConstants => new(vsInfoProvider.Name, $"SonarLint Visual Studio/{VersionHelper.SonarLintVersion}", Process.GetCurrentProcess().Id);

public FeatureFlagsDto FeatureFlags => new(true, true, true, true, false, false, true, true, true);
public FeatureFlagsDto FeatureFlags => new(true, true, true, true, true, false, true, true, true);

public TelemetryClientConstantAttributesDto TelemetryConstants => new("visualstudio", "SonarLint Visual Studio", VersionHelper.SonarLintVersion, VisualStudioHelpers.VisualStudioVersion, new Dictionary<string, object>
{
Expand All @@ -68,7 +68,7 @@ public SLCoreConstantsProvider(IVsInfoProvider vsInfoProvider)
Language.CSS,
Language.SECRETS
];

private static IdeVersionInformation GetVsVersion(IVsVersion vsVersion)
{
if (vsVersion == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,5 +337,5 @@ private void CheckUIContextUpdated(uint expectedCookie, int expectedState) =>
private void CheckToolWindowServiceIsCalled() =>
toolWindowService.Received().EnsureToolWindowExists(TaintToolWindow.ToolWindowId);

private void CheckStoreIsCleared() => taintStore.Received(1).Set([], null);
private void CheckStoreIsCleared() => taintStore.Received(1).Reset();
}
Loading

0 comments on commit 6e80ab2

Please sign in to comment.