Skip to content

Commit 9f5d1a3

Browse files
microsoft-github-policy-service[bot]Bicep Automation
andauthored
Reformat code (#18332)
Update code to match the house style 😎 Co-authored-by: Bicep Automation <[email protected]>
1 parent a08ac8b commit 9f5d1a3

File tree

8 files changed

+23
-18
lines changed

8 files changed

+23
-18
lines changed

src/Bicep.Cli.UnitTests/Services/ReplEnvironmentTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public void ShouldSubmitBuffer_terminates_at_expected_point(string text)
305305
}
306306

307307
private static void EnsureSingleInput(string text)
308-
{
308+
{
309309
var input = text.NormalizeNewlines().Split('\n');
310310
for (var i = 0; i < input.Length; i++)
311311
{
@@ -327,6 +327,6 @@ private static ImmutableArray<string> EvaluateInputs(IEnumerable<string> input)
327327
outputs.Add(AnsiHelper.ReplaceCodes(output));
328328
}
329329

330-
return [..outputs];
330+
return [.. outputs];
331331
}
332332
}

src/Bicep.Core.UnitTests/Utils/TestEnvironment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ string CurrentDirectory
1414
public static TestEnvironment Default = new(
1515
ImmutableDictionary<string, string?>.Empty,
1616
System.Environment.CurrentDirectory);
17-
17+
1818
private readonly IEnvironment realEnvironment = new Core.Utils.Environment();
1919

2020
public IEnvironment WithVariables(params (string key, string? value)[] variables)

src/Bicep.Core/Utils/Environment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public string CurrentDirectory
4141

4242
return null;
4343
}
44-
44+
4545
private static IEnvironment.BicepVersionInfo GetVersionInfo()
4646
{
4747
var version = ThisAssembly.AssemblyInformationalVersion.Split('+');

src/vscode-bicep-ui/apps/deploy-pane/src/__tests__/App.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe("App", () => {
8181
fireEvent.click(deployButton);
8282

8383
await waitFor(() => {
84-
expect(screen.getAllByText('Succeeded')[0]).toBeInTheDocument();
84+
expect(screen.getAllByText("Succeeded")[0]).toBeInTheDocument();
8585
});
8686

8787
expect(container).toMatchSnapshot();
@@ -100,7 +100,7 @@ describe("App", () => {
100100
fireEvent.click(deployButton);
101101

102102
await waitFor(() => {
103-
expect(screen.getAllByText('Failed')[0]).toBeInTheDocument();
103+
expect(screen.getAllByText("Failed")[0]).toBeInTheDocument();
104104
});
105105

106106
expect(mockClient.deploymentOperations.listAtScope).not.toHaveBeenCalled();
@@ -116,7 +116,7 @@ describe("App", () => {
116116
fireEvent.click(validateButton);
117117

118118
await waitFor(() => {
119-
expect(screen.getAllByText('InvalidTemplate')[0]).toBeInTheDocument();
119+
expect(screen.getAllByText("InvalidTemplate")[0]).toBeInTheDocument();
120120
});
121121

122122
expect(container).toMatchSnapshot();
@@ -131,7 +131,7 @@ describe("App", () => {
131131
fireEvent.click(whatIfButton);
132132

133133
await waitFor(() => {
134-
expect(screen.getAllByText('Succeeded')[0]).toBeInTheDocument();
134+
expect(screen.getAllByText("Succeeded")[0]).toBeInTheDocument();
135135
});
136136

137137
expect(container).toMatchSnapshot();
@@ -186,4 +186,4 @@ function getStateResultMessage() {
186186
return createGetStateResultMessage({
187187
scope: scope,
188188
});
189-
}
189+
}

src/vscode-bicep-ui/apps/deploy-pane/src/__tests__/setupGlobals.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Licensed under the MIT License.
33

44
import { vi } from "vitest";
5-
import '@testing-library/jest-dom/vitest';
5+
6+
import "@testing-library/jest-dom/vitest";
67
import "element-internals-polyfill";
78

89
global.ResizeObserver = vi.fn(() => ({

src/vscode-bicep-ui/apps/deploy-pane/src/components/sections/PortalButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function PortalButton(props: PortalButtonProps) {
3030
style={{ verticalAlign: "middle" }}
3131
title="Open in Portal"
3232
href={`${portalResourceUrl}`} //CodeQL [SM01507] False positive - we use C# code to pass in the base URL
33-
>
33+
>
3434
{" "}
3535
<Codicon name="globe" size={12} />
3636
</a>

src/vscode-bicep/src/azure/azureClients.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
3+
import { ManagementGroupsAPI } from "@azure/arm-managementgroups";
34
import { ResourceManagementClient } from "@azure/arm-resources";
45
import { SubscriptionClient } from "@azure/arm-resources-subscriptions";
56
import {
67
AzExtClientContext,
78
createAzureClient,
89
createAzureSubscriptionClient,
910
} from "@microsoft/vscode-azext-azureutils";
10-
import { ManagementGroupsAPI } from "@azure/arm-managementgroups";
1111

1212
// Lazy-load @azure packages to improve startup performance.
1313

@@ -23,8 +23,5 @@ export async function createSubscriptionClient(context: AzExtClientContext): Pro
2323
}
2424

2525
export async function createManagementGroupsClient(context: AzExtClientContext): Promise<ManagementGroupsAPI> {
26-
return createAzureSubscriptionClient(
27-
context,
28-
(await import("@azure/arm-managementgroups")).ManagementGroupsAPI,
29-
);
26+
return createAzureSubscriptionClient(context, (await import("@azure/arm-managementgroups")).ManagementGroupsAPI);
3027
}

src/vscode-bicep/src/utils/AzurePickers.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ import {
2121
nonNullProp,
2222
parseError,
2323
} from "@microsoft/vscode-azext-utils";
24-
import { createManagementGroupsClient, createResourceManagementClient, createSubscriptionClient } from "../azure/azureClients";
24+
import {
25+
createManagementGroupsClient,
26+
createResourceManagementClient,
27+
createSubscriptionClient,
28+
} from "../azure/azureClients";
2529
import { Disposable } from "./disposable";
2630
import { OutputChannelManager } from "./OutputChannelManager";
2731

@@ -124,7 +128,10 @@ export class AzurePickers extends Disposable {
124128
return (await context.ui.showQuickPick(picks, { placeHolder: "Select location" })).data;
125129
}
126130

127-
public async pickManagementGroup(context: IActionContext, subscription: AzureSubscription): Promise<ManagementGroupInfo> {
131+
public async pickManagementGroup(
132+
context: IActionContext,
133+
subscription: AzureSubscription,
134+
): Promise<ManagementGroupInfo> {
128135
await this.EnsureSignedIn();
129136

130137
const client = await createManagementGroupsClient([context, createSubscriptionContext(subscription)]);

0 commit comments

Comments
 (0)