Skip to content

Commit

Permalink
Enable FixSuggestion feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
vnaskos-sonar committed Oct 2, 2024
1 parent 1e6caa2 commit a3750b2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
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);
var expectedFeatureFlags = new FeatureFlagsDto(true, true, true, true, false, false, true, true, true);
var actual = testSubject.FeatureFlags;

actual.Should().BeEquivalentTo(expectedFeatureFlags);
Expand Down
2 changes: 1 addition & 1 deletion 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);
public FeatureFlagsDto FeatureFlags => new(true, true, true, true, false, false, true, true, true);

public TelemetryClientConstantAttributesDto TelemetryConstants => new("visualstudio", "SonarLint Visual Studio", VersionHelper.SonarLintVersion, VisualStudioHelpers.VisualStudioVersion, new Dictionary<string, object>
{
Expand Down
2 changes: 1 addition & 1 deletion src/SLCore.IntegrationTests/SLCoreTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void Start()
var constantsProvider = Substitute.For<ISLCoreConstantsProvider>();
constantsProvider.ClientConstants.Returns(new ClientConstantsDto("SLVS_Integration_Tests",
$"SLVS_Integration_Tests/{VersionHelper.SonarLintVersion}", Process.GetCurrentProcess().Id));
constantsProvider.FeatureFlags.Returns(new FeatureFlagsDto(true, true, false, true, false, false, true, false));
constantsProvider.FeatureFlags.Returns(new FeatureFlagsDto(true, true, false, true, false, false, true, false, false));
constantsProvider.TelemetryConstants.Returns(new TelemetryClientConstantAttributesDto("slvs_integration_tests", "SLVS Integration Tests",
VersionHelper.SonarLintVersion, "17.0", new()));
SetLanguagesConfigurationToDefaults(constantsProvider);
Expand Down
2 changes: 1 addition & 1 deletion src/SLCore.UnitTests/SLCoreInstanceHandleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class SLCoreInstanceHandleTests
private const string UserHome = "userHomeSl";

private static readonly ClientConstantsDto ClientConstants = new(default, default, default);
private static readonly FeatureFlagsDto FeatureFlags = new(default, default, default, default, default, default, default, default);
private static readonly FeatureFlagsDto FeatureFlags = new(default, default, default, default, default, default, default, default, default);
private static readonly TelemetryClientConstantAttributesDto TelemetryConstants = new(default, default, default, default, default);

private static readonly SonarQubeConnectionConfigurationDto SonarQubeConnection1 = new("sq1", true, "http://localhost/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System.Collections.Generic;
using Newtonsoft.Json;
using SonarLint.VisualStudio.SLCore.Common.Models;
using SonarLint.VisualStudio.SLCore.Service.Connection.Models;
Expand All @@ -37,7 +36,7 @@ public void Serialize_AsExpected()
var testSubject = new InitializeParams(
new ClientConstantsDto("TESTname", "TESTagent", 11223344),
new HttpConfigurationDto(new SslConfigurationDto()),
new FeatureFlagsDto(false, true, false, true, false, true, false, false),
new FeatureFlagsDto(false, true, false, true, false, true, false, false, false),
"storageRoot",
"workDir",
["myplugin1", "myplugin2"],
Expand Down Expand Up @@ -77,7 +76,8 @@ [new SonarCloudConnectionConfigurationDto("con2", false, "organization1")],
"shouldManageServerSentEvents": false,
"enableDataflowBugDetection": true,
"shouldManageFullSynchronization": false,
"enableTelemetry": false
"enableTelemetry": false,
"canOpenFixSuggestion": false
},
"storageRoot": "storageRoot",
"workDir": "workDir",
Expand Down
3 changes: 2 additions & 1 deletion src/SLCore/Service/Lifecycle/Models/FeatureFlagsDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ public record FeatureFlagsDto(
bool shouldManageServerSentEvents,
bool enableDataflowBugDetection,
bool shouldManageFullSynchronization,
bool enableTelemetry);
bool enableTelemetry,
bool canOpenFixSuggestion);
}

0 comments on commit a3750b2

Please sign in to comment.