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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat code #13679

Merged
merged 1 commit into from Mar 25, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Bicep.Core.UnitTests/Assertions/ResultAssertions.cs
Expand Up @@ -36,11 +36,11 @@ public ResultAssertions(Result<TSuccess, TError> result)
{
Execute.Assertion
.BecauseOf(because, becauseArgs)
.Given<Result<TSuccess,TError>>(() => Subject)
.Given<Result<TSuccess, TError>>(() => Subject)
.ForCondition(x => !x.IsSuccess())
.FailWith("Expected result to be a failure{reason}, but it was a success with value {0}", x => x.TryUnwrap());

return new AndConstraint<ResultAssertions<TSuccess,TError>>(this);
return new AndConstraint<ResultAssertions<TSuccess, TError>>(this);

}
public AndConstraint<ResultAssertions<TSuccess, TError>> BeFailureWithValue(TError expectedError, string because = "", params object[] becauseArgs)
Expand Down
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Bicep.Core.Utils;
using Bicep.Core.UnitTests.Assertions;
using Bicep.Core.Utils;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

Expand Down
Expand Up @@ -422,7 +422,7 @@ ObjectPropertyExpression convertObjectProperty(JProperty property)
key,
ConvertToExpression(parsedExpressions, property.Value));
}


if (parsedExpressions.TryGetValue(toConvert, out var armExpression))
{
Expand Down
26 changes: 13 additions & 13 deletions src/Bicep.Core/Semantics/Namespaces/ThirdPartyNamespaceType.cs
Expand Up @@ -22,19 +22,19 @@ public static NamespaceType Create(string name, string aliasName, IResourceTypeP
// NamespaceConfig is not null
if (resourceTypeProvider is ThirdPartyResourceTypeProvider thirdPartyProvider && thirdPartyProvider.GetNamespaceConfiguration() is NamespaceConfiguration namespaceConfig && namespaceConfig != null)
{
return new NamespaceType(
aliasName,
new NamespaceSettings(
IsSingleton: namespaceConfig.IsSingleton,
BicepProviderName: namespaceConfig.Name,
ConfigurationType: (ObjectType?)namespaceConfig.ConfigurationObject,
ArmTemplateProviderName: namespaceConfig.Name,
ArmTemplateProviderVersion: namespaceConfig.Version),
ImmutableArray<TypeProperty>.Empty,
ImmutableArray<FunctionOverload>.Empty,
ImmutableArray<BannedFunction>.Empty,
ImmutableArray<Decorator>.Empty,
resourceTypeProvider);
return new NamespaceType(
aliasName,
new NamespaceSettings(
IsSingleton: namespaceConfig.IsSingleton,
BicepProviderName: namespaceConfig.Name,
ConfigurationType: (ObjectType?)namespaceConfig.ConfigurationObject,
ArmTemplateProviderName: namespaceConfig.Name,
ArmTemplateProviderVersion: namespaceConfig.Version),
ImmutableArray<TypeProperty>.Empty,
ImmutableArray<FunctionOverload>.Empty,
ImmutableArray<BannedFunction>.Empty,
ImmutableArray<Decorator>.Empty,
resourceTypeProvider);
}

// NamespaceConfig is required to be set for 3PProviders
Expand Down
Expand Up @@ -66,7 +66,7 @@ public ResourceTypeComponents LoadType(ResourceTypeReference reference)

TypeSymbol? configurationType = null;

if (typeSettings.ConfigurationType is {} reference)
if (typeSettings.ConfigurationType is { } reference)
{

if (typeLoader.LoadType(reference) is not ObjectType objectType)
Expand Down
Expand Up @@ -124,7 +124,8 @@ private static TypePropertyFlags ConvertToReadOnly(TypePropertyFlags typePropert
{
var loadedFallbackType = resourceTypeLoader.LoadFallbackResourceType();

if (loadedFallbackType != null){
if (loadedFallbackType != null)
{
var resourceType = generatedTypeCache.GetOrAdd(flags, typeReference, () =>
{
var resourceType = new ResourceTypeComponents(
Expand Down