Skip to content

Commit

Permalink
Reformat code (#16124)
Browse files Browse the repository at this point in the history
Update code to match the house style 😎

Co-authored-by: Bicep Automation <[email protected]>
  • Loading branch information
microsoft-github-policy-service[bot] and Bicep Automation authored Jan 20, 2025
1 parent a9f4b01 commit 4d984eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/vscode-bicep/src/commands/decompileParams.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IActionContext, IAzureQuickPickItem, UserCancelledError } from "@microsoft/vscode-azext-utils";
import assert from "assert";
import * as fse from "fs-extra";
import * as path from "path";
import { IActionContext, IAzureQuickPickItem, UserCancelledError } from "@microsoft/vscode-azext-utils";
import * as fse from "fs-extra";
import vscode, { MessageItem, Uri, window } from "vscode";
import { DocumentUri, LanguageClient } from "vscode-languageclient/node";
import { OutputChannelManager } from "../utils/OutputChannelManager";
Expand Down
15 changes: 10 additions & 5 deletions src/vscode-bicep/src/commands/pasteAsBicep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ export class PasteAsBicepCommand implements Command {
let finalPastedBicep: string | undefined;

try {
documentUri = await findOrCreateActiveBicepFile(context, documentUri, "Choose which Bicep file to paste into", true);
documentUri = await findOrCreateActiveBicepFile(
context,
documentUri,
"Choose which Bicep file to paste into",
true,
);

const document = await workspace.openTextDocument(documentUri);
const editor = await window.showTextDocument(document);
Expand Down Expand Up @@ -81,7 +86,7 @@ export class PasteAsBicepCommand implements Command {
rangeEnd - rangeStart,
clipboardText,
false /* queryCanPaste */,
editor.document.languageId
editor.document.languageId,
);

context.telemetry.properties.pasteType = result.pasteType;
Expand Down Expand Up @@ -146,7 +151,7 @@ export class PasteAsBicepCommand implements Command {
rangeLength,
jsonContent,
queryCanPaste,
languageId
languageId,
};
const decompileResult: BicepDecompileForPasteCommandResult = await this.client.sendRequest(
"workspace/executeCommand",
Expand Down Expand Up @@ -187,7 +192,7 @@ export class PasteAsBicepCommand implements Command {
e.reason !== TextDocumentChangeReason.Redo &&
e.reason !== TextDocumentChangeReason.Undo &&
e.document === editor?.document &&
(e.document.languageId === bicepLanguageId || e.document.languageId === bicepParamLanguageId ) &&
(e.document.languageId === bicepLanguageId || e.document.languageId === bicepParamLanguageId) &&
e.contentChanges.length === 1
) {
const contentChange = e.contentChanges[0];
Expand Down Expand Up @@ -234,7 +239,7 @@ export class PasteAsBicepCommand implements Command {
formattedPastedText.length,
clipboardText,
true, // queryCanPaste
e.document.languageId
e.document.languageId,
);
if (!canPasteResult.pasteType) {
// Nothing we know how to convert, or pasting is not allowed in this context
Expand Down

0 comments on commit 4d984eb

Please sign in to comment.