Skip to content

Commit e5ae413

Browse files
Run: npm run format
1 parent 0fc3adf commit e5ae413

File tree

11 files changed

+40
-20
lines changed

11 files changed

+40
-20
lines changed

extensions/ql-vscode/src/codeql-cli/distribution.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,10 @@ export interface GithubReleaseAsset {
954954
}
955955

956956
export class GithubApiError extends Error {
957-
constructor(public status: number, public body: string) {
957+
constructor(
958+
public status: number,
959+
public body: string,
960+
) {
958961
super(`API call failed with status code ${status}, body: ${body}`);
959962
}
960963
}

extensions/ql-vscode/src/common/vscode/archive-filesystem-provider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export class File implements vscode.FileStat {
1414
mtime: number;
1515
size: number;
1616

17-
constructor(public name: string, public data: Uint8Array) {
17+
constructor(
18+
public name: string,
19+
public data: Uint8Array,
20+
) {
1821
this.type = vscode.FileType.File;
1922
this.ctime = Date.now();
2023
this.mtime = Date.now();

extensions/ql-vscode/src/common/vscode/file-path-discovery.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ export abstract class FilePathDiscovery<T extends PathData> extends Discovery {
6767
* @param name Name of the discovery operation, for logging purposes.
6868
* @param fileWatchPattern Passed to `vscode.RelativePattern` to determine the files to watch for changes to.
6969
*/
70-
constructor(name: string, private readonly fileWatchPattern: string) {
70+
constructor(
71+
name: string,
72+
private readonly fileWatchPattern: string,
73+
) {
7174
super(name, extLogger);
7275

7376
this.onDidChangePathDataEmitter = this.push(new EventEmitter<void>());

extensions/ql-vscode/src/common/vscode/progress.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ export class UserCancellationException extends Error {
1010
* @param message The error message
1111
* @param silent If silent is true, then this exception will avoid showing a warning message to the user.
1212
*/
13-
constructor(message?: string, public readonly silent = false) {
13+
constructor(
14+
message?: string,
15+
public readonly silent = false,
16+
) {
1417
super(message);
1518
}
1619
}

extensions/ql-vscode/src/common/vscode/webview-html.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ export function getHtmlForWebview(
7272
<head>
7373
<meta http-equiv="Content-Security-Policy"
7474
content="default-src 'none'; script-src 'nonce-${nonce}'${
75-
allowWasmEval ? " 'wasm-unsafe-eval'" : ""
76-
}; font-src ${fontSrc}; style-src ${styleSrc}; connect-src ${
77-
webview.cspSource
78-
};">
75+
allowWasmEval ? " 'wasm-unsafe-eval'" : ""
76+
}; font-src ${fontSrc}; style-src ${styleSrc}; connect-src ${
77+
webview.cspSource
78+
};">
7979
${stylesheetsHtmlLines.join(` ${EOL}`)}
8080
</head>
8181
<body>

extensions/ql-vscode/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ const AUTOGENERATE_QL_PACKS = new Setting(
693693
);
694694

695695
const AutogenerateQLPacksValues = ["ask", "never"] as const;
696-
type AutogenerateQLPacks = typeof AutogenerateQLPacksValues[number];
696+
type AutogenerateQLPacks = (typeof AutogenerateQLPacksValues)[number];
697697

698698
export function getAutogenerateQlPacks(): AutogenerateQLPacks {
699699
const value = AUTOGENERATE_QL_PACKS.getValue<AutogenerateQLPacks>();

extensions/ql-vscode/src/extension.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,8 @@ function getCommands(
216216
"codeQL.restartLegacyQueryServerOnConfigChange": restartQueryServer,
217217
"codeQL.restartQueryServerOnExternalConfigChange": restartQueryServer,
218218
"codeQL.copyVersion": async () => {
219-
const text = `CodeQL extension version: ${
220-
extension?.packageJSON.version
221-
} \nCodeQL CLI version: ${await getCliVersion()} \nPlatform: ${platform()} ${arch()}`;
219+
const text = `CodeQL extension version: ${extension?.packageJSON
220+
.version} \nCodeQL CLI version: ${await getCliVersion()} \nPlatform: ${platform()} ${arch()}`;
222221
await env.clipboard.writeText(text);
223222
void showAndLogInformationMessage(extLogger, text);
224223
},

extensions/ql-vscode/src/language-support/contextual/template-provider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ export class TemplatePrintAstProvider {
279279
export class TemplatePrintCfgProvider {
280280
private cache: CachedOperation<[Uri, Record<string, string>] | undefined>;
281281

282-
constructor(private cli: CodeQLCliServer, private dbm: DatabaseManager) {
282+
constructor(
283+
private cli: CodeQLCliServer,
284+
private dbm: DatabaseManager,
285+
) {
283286
this.cache = new CachedOperation<[Uri, Record<string, string>] | undefined>(
284287
this.getCfgUri.bind(this),
285288
);

extensions/ql-vscode/src/query-testing/test-ui.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ class QLTestListener extends DisposableObject {
4040
export class TestUIService extends TestManagerBase implements TestController {
4141
private readonly listeners: Map<TestAdapter, QLTestListener> = new Map();
4242

43-
public constructor(app: App, private readonly testHub: TestHub) {
43+
public constructor(
44+
app: App,
45+
private readonly testHub: TestHub,
46+
) {
4447
super(app);
4548

4649
testHub.registerTestController(this);

extensions/ql-vscode/src/variant-analysis/export-results.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,13 @@ export async function exportToGist(
289289
}
290290

291291
// Convert markdownFiles to the appropriate format for uploading to gist
292-
const gistFiles = markdownFiles.reduce((acc, cur) => {
293-
acc[`${cur.fileName}.md`] = { content: cur.content.join("\n") };
294-
return acc;
295-
}, {} as { [key: string]: { content: string } });
292+
const gistFiles = markdownFiles.reduce(
293+
(acc, cur) => {
294+
acc[`${cur.fileName}.md`] = { content: cur.content.join("\n") };
295+
return acc;
296+
},
297+
{} as { [key: string]: { content: string } },
298+
);
296299

297300
const gistUrl = await createGist(credentials, description, gistFiles);
298301
if (gistUrl) {

0 commit comments

Comments
 (0)