Skip to content

Commit

Permalink
Make IDE0055 as Error + fix formatting (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeaugrand committed Jul 23, 2022
1 parent 48f8945 commit b2eb6f6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_space_around_declaration_statements = ignore
dotnet_diagnostic.IDE0055.severity = warning

[*.md]
charset = utf-8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public async Task ExecuteLoRaDeviceMessageMustBeSuccessfullWhenParametersAreProv
// Arrange
var loraDeviceMethodManager = new LoraDeviceMethodManager(this.mockHttpClient);
var deviceId = Guid.NewGuid().ToString();
var command = new DeviceModelCommand {
var command = new DeviceModelCommand
{
Frame = Guid.NewGuid().ToString()
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void WhenLoraFeatureDisableClickToItemShouldRedirectToDeviceDetailsPage()
var modelId = Fixture.Create<string>();

_ = this.mockDeviceModelsClientService.Setup(service => service.GetDeviceModels())
.ReturnsAsync(new[] {new DeviceModel {ModelId = modelId, SupportLoRaFeatures = false}});
.ReturnsAsync(new[] { new DeviceModel { ModelId = modelId, SupportLoRaFeatures = false } });

_ = Services.AddSingleton(new PortalSettings { IsLoRaSupported = true });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void ReturnButtonMustNavigateToPreviousPage()
{
// Arrange
_ = this.mockEdgeDeviceClientService.Setup(service => service.GetDevice(this.mockdeviceId))
.ReturnsAsync(new IoTEdgeDevice {ConnectionState = "false"});
.ReturnsAsync(new IoTEdgeDevice { ConnectionState = "false" });

var cut = RenderComponent<EdgeDeviceDetailPage>(ComponentParameter.CreateParameter("deviceId", this.mockdeviceId));
_ = cut.WaitForElement("#saveButton");
Expand Down Expand Up @@ -269,7 +269,7 @@ public void ClickOnLogsShouldDisplayLogs()
Type = "Other",
Modules= new List<IoTEdgeModule>(){mockIoTEdgeModule}
};

_ = this.mockEdgeDeviceClientService.Setup(service => service.GetDevice(this.mockdeviceId))
.ReturnsAsync(mockIoTEdgeDevice);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void ConcentratorMetricLoaderServiceShouldHandleInternalServerErrorExcept
_ = this.mockDeviceService.Setup(service => service.GetConcentratorsCount()).ReturnsAsync(10);
_ = this.mockDeviceService.Setup(service => service.GetConnectedConcentratorsCount()).ThrowsAsync(new InternalServerErrorException("test"));

using var cancellationToken = new CancellationTokenSource();
using var cancellationToken = new CancellationTokenSource();

// Act
_ = this.concentratorMetricLoaderService.StartAsync(cancellationToken.Token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public async Task UpdateDeviceConfigurationShouldUpdateDeviceConfiguration()
// Arrange
var configuration = Fixture.Create<DeviceConfig>();

_ = MockHttpClient.When(HttpMethod.Put,$"/api/device-configurations/{configuration.ConfigurationId}")
_ = MockHttpClient.When(HttpMethod.Put, $"/api/device-configurations/{configuration.ConfigurationId}")
.With(m =>
{
_ = m.Content.Should().BeAssignableTo<ObjectContent<DeviceConfig>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public abstract class DeviceModelsControllerBase<TListItemModel, TModel> : Contr
where TListItemModel : DeviceModel
where TModel : DeviceModel
{
#pragma warning disable RCS1158 // Static member in generic type should use a type parameter.
/// <summary>
/// The default partition key.
/// </summary>
#pragma warning disable RCS1158 // Static member in generic type should use a type parameter.
public const string DefaultPartitionKey = "0";
#pragma warning restore RCS1158 // Static member in generic type should use a type parameter.

Expand Down

0 comments on commit b2eb6f6

Please sign in to comment.