Skip to content

Commit

Permalink
Reformat code (#15659)
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 Nov 25, 2024
1 parent ed0e36e commit 78ea16f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,10 @@ private IEnumerable<CompletionItem> GetACRPartialPathCompletionsFromBicepConfig(
// br:mcr.microsoft.com/bicep/:<CURSOR>
private IEnumerable<CompletionItem> GetPublicModuleCompletions(string replacementText, BicepCompletionContext context)
{
var (prefix, suffix) = replacementText switch {
{} x when x.StartsWith("'br/public:", StringComparison.Ordinal) => ("'br/public:", x["'br/public:".Length..].TrimEnd('\'')),
{} x when x.StartsWith($"'br:{PublicMCRRegistry}/bicep/", StringComparison.Ordinal) => ($"'br:{PublicMCRRegistry}/bicep/", x[$"'br:{PublicMCRRegistry}/bicep/".Length..].TrimEnd('\'')),
var (prefix, suffix) = replacementText switch
{
{ } x when x.StartsWith("'br/public:", StringComparison.Ordinal) => ("'br/public:", x["'br/public:".Length..].TrimEnd('\'')),
{ } x when x.StartsWith($"'br:{PublicMCRRegistry}/bicep/", StringComparison.Ordinal) => ($"'br:{PublicMCRRegistry}/bicep/", x[$"'br:{PublicMCRRegistry}/bicep/".Length..].TrimEnd('\'')),
_ => (null, null),
};

Expand Down
4 changes: 2 additions & 2 deletions src/vscode-bicep/src/panes/deploy/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class DeployPaneView extends Disposable {
Environment.ChinaCloud,
Environment.GermanCloud,
Environment.USGovernment,
].map(env => env.resourceManagerEndpointUrl);
].map((env) => env.resourceManagerEndpointUrl);

return `
<!DOCTYPE html>
Expand All @@ -268,7 +268,7 @@ export class DeployPaneView extends Disposable {
Use a content security policy to only allow loading images from our extension directory,
and only allow scripts that have a specific nonce.
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' ${armEndpoints.join(' ')}; style-src ${cspSource} 'unsafe-inline'; img-src ${cspSource} data:; script-src 'nonce-${nonce}' vscode-webview-resource:; font-src data: ${cspSource};">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' ${armEndpoints.join(" ")}; style-src ${cspSource} 'unsafe-inline'; img-src ${cspSource} data:; script-src 'nonce-${nonce}' vscode-webview-resource:; font-src data: ${cspSource};">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="vscode-codicon-stylesheet" rel="stylesheet" nonce="${nonce}" href="${codiconCssUri}">
</head>
Expand Down
2 changes: 1 addition & 1 deletion src/vscode-bicep/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const extensionConfig: webpack.Configuration = {
to: path.join(__dirname, "out/deploy-pane"),
globOptions: {
ignore: ["**/index.html"],
}
},
},
],
}),
Expand Down

0 comments on commit 78ea16f

Please sign in to comment.