Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat code #14441

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Bicep.Cli.IntegrationTests/LintCommandTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Collections.Immutable;
using System.Diagnostics;
using Bicep.Cli.UnitTests;
using Bicep.Core.Configuration;
using Bicep.Core.Registry;
using Bicep.Core.Registry.PublicRegistry;
using Bicep.Core.Samples;
using Bicep.Core.UnitTests;
using Bicep.Core.UnitTests.Mock;
Expand All @@ -11,14 +15,10 @@
using FluentAssertions;
using FluentAssertions.Execution;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.WindowsAzure.ResourceStack.Common.Json;
using Microsoft.Extensions.DependencyInjection;
using Moq;
using Bicep.Core.Registry.PublicRegistry;
using System.Collections.Immutable;
using System.Diagnostics;
using Bicep.Cli.UnitTests;
using FileSystem = System.IO.Abstractions.FileSystem;

namespace Bicep.Cli.IntegrationTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,11 @@ public async Task IfModuleVersion_HasOldVersionWithSuffix_Fail()
PublishedModules = [
$"{PREFIX}/fake/avm/res/app/container-app1a:0.1.0",
$"{PREFIX}/fake/avm/res/app/container-app1b:0.1.0-beta",
],
],
ModulesMetadata = [
("fake/avm/res/app/container-app1a", ["0.1.0", "0.2.0"]),
("fake/avm/res/app/container-app1b", ["0.1.0", "0.2.0"]),
],
],
});

result.Should().NotHaveCompileError(UnableToRestoreErrorCode);
Expand All @@ -514,7 +514,7 @@ public async Task SuffixIsLowerThanVersionWithoutSuffix()
],
ModulesMetadata = [
("fake/avm/res/app/container-app2", ["0.1.0", "0.2.0"]),
],
],
});

result.Should().HaveStderrMatch("*Warning use-recent-module-versions: Use a more recent version of module 'fake/avm/res/app/container-app2'. The most recent version is 0.2.0.*");
Expand All @@ -536,7 +536,7 @@ public async Task SuffixWithHigherVersion_IsHigherThanLowerVersionWithoutSuffix(
],
ModulesMetadata = [
("fake/avm/res/app/container-app2", ["0.1.0", "0.2.0"]),
],
],
});

result.Should().NotHaveStderr();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public partial class UseRecentModuleVersionsRuleTests : LinterRuleTestsBase
.WithRegistration(x => x.AddSingleton(
IConfigurationManager.WithStaticConfiguration(
IConfigurationManager.GetBuiltInConfiguration()
.WithAllAnalyzers())));
.WithAllAnalyzers())));

private static CompilationResult Compile(
string bicep,
Expand Down Expand Up @@ -249,7 +249,7 @@ public void MultiplePatchVersionsBehind()
}
""",
["avm/res/network/public-ip-address"],
["0.3.0", "0.4.1", "0.4.2", "0.4.5" ]
["0.3.0", "0.4.1", "0.4.2", "0.4.5"]
);
result.Diagnostics.Where(d => d.Code == UseRecentModuleVersionsRule.Code)
.Should()
Expand Down
2 changes: 1 addition & 1 deletion src/Bicep.Core/Analyzers/Linter/LinterRulesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class LinterRulesProvider : ILinterRulesProvider

public LinterRulesProvider()
{
this.linterRulesLazy = new (() => GetLinterRulesInternal().ToImmutableDictionary());
this.linterRulesLazy = new(() => GetLinterRulesInternal().ToImmutableDictionary());
}

[UnconditionalSuppressMessage("Trimming", "IL2072:Target parameter argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The return value of the source method does not have matching annotations.", Justification = "List of types comes from a source analyzer")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task<ImmutableArray<BicepModuleMetadata>> GetModuleMetadata()
if (metadata is not null)
{
Trace.WriteLine($"{nameof(PublicRegistryModuleMetadataClient)}: Retrieved info on {metadata.Length} public registry modules.");
return [..metadata];
return [.. metadata];
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public Task TryAwaitCache(bool forceUpdate)
return UpdateCacheIfNeeded(forceUpdate: forceUpdate, initialDelay: false);
}

public void StartUpdateCache(bool forceUpdate) {
public void StartUpdateCache(bool forceUpdate)
{
_ = TryAwaitCache(forceUpdate);
}
public async Task<bool> TryUpdateCacheAsync()
Expand Down
Loading