Run: npm run format
This commit is contained in:
@@ -954,7 +954,10 @@ export interface GithubReleaseAsset {
|
||||
}
|
||||
|
||||
export class GithubApiError extends Error {
|
||||
constructor(public status: number, public body: string) {
|
||||
constructor(
|
||||
public status: number,
|
||||
public body: string,
|
||||
) {
|
||||
super(`API call failed with status code ${status}, body: ${body}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,10 @@ export class File implements vscode.FileStat {
|
||||
mtime: number;
|
||||
size: number;
|
||||
|
||||
constructor(public name: string, public data: Uint8Array) {
|
||||
constructor(
|
||||
public name: string,
|
||||
public data: Uint8Array,
|
||||
) {
|
||||
this.type = vscode.FileType.File;
|
||||
this.ctime = Date.now();
|
||||
this.mtime = Date.now();
|
||||
|
||||
@@ -67,7 +67,10 @@ export abstract class FilePathDiscovery<T extends PathData> extends Discovery {
|
||||
* @param name Name of the discovery operation, for logging purposes.
|
||||
* @param fileWatchPattern Passed to `vscode.RelativePattern` to determine the files to watch for changes to.
|
||||
*/
|
||||
constructor(name: string, private readonly fileWatchPattern: string) {
|
||||
constructor(
|
||||
name: string,
|
||||
private readonly fileWatchPattern: string,
|
||||
) {
|
||||
super(name, extLogger);
|
||||
|
||||
this.onDidChangePathDataEmitter = this.push(new EventEmitter<void>());
|
||||
|
||||
@@ -10,7 +10,10 @@ export class UserCancellationException extends Error {
|
||||
* @param message The error message
|
||||
* @param silent If silent is true, then this exception will avoid showing a warning message to the user.
|
||||
*/
|
||||
constructor(message?: string, public readonly silent = false) {
|
||||
constructor(
|
||||
message?: string,
|
||||
public readonly silent = false,
|
||||
) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,10 +72,10 @@ export function getHtmlForWebview(
|
||||
<head>
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'none'; script-src 'nonce-${nonce}'${
|
||||
allowWasmEval ? " 'wasm-unsafe-eval'" : ""
|
||||
}; font-src ${fontSrc}; style-src ${styleSrc}; connect-src ${
|
||||
webview.cspSource
|
||||
};">
|
||||
allowWasmEval ? " 'wasm-unsafe-eval'" : ""
|
||||
}; font-src ${fontSrc}; style-src ${styleSrc}; connect-src ${
|
||||
webview.cspSource
|
||||
};">
|
||||
${stylesheetsHtmlLines.join(` ${EOL}`)}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -693,7 +693,7 @@ const AUTOGENERATE_QL_PACKS = new Setting(
|
||||
);
|
||||
|
||||
const AutogenerateQLPacksValues = ["ask", "never"] as const;
|
||||
type AutogenerateQLPacks = typeof AutogenerateQLPacksValues[number];
|
||||
type AutogenerateQLPacks = (typeof AutogenerateQLPacksValues)[number];
|
||||
|
||||
export function getAutogenerateQlPacks(): AutogenerateQLPacks {
|
||||
const value = AUTOGENERATE_QL_PACKS.getValue<AutogenerateQLPacks>();
|
||||
|
||||
@@ -216,9 +216,8 @@ function getCommands(
|
||||
"codeQL.restartLegacyQueryServerOnConfigChange": restartQueryServer,
|
||||
"codeQL.restartQueryServerOnExternalConfigChange": restartQueryServer,
|
||||
"codeQL.copyVersion": async () => {
|
||||
const text = `CodeQL extension version: ${
|
||||
extension?.packageJSON.version
|
||||
} \nCodeQL CLI version: ${await getCliVersion()} \nPlatform: ${platform()} ${arch()}`;
|
||||
const text = `CodeQL extension version: ${extension?.packageJSON
|
||||
.version} \nCodeQL CLI version: ${await getCliVersion()} \nPlatform: ${platform()} ${arch()}`;
|
||||
await env.clipboard.writeText(text);
|
||||
void showAndLogInformationMessage(extLogger, text);
|
||||
},
|
||||
|
||||
@@ -279,7 +279,10 @@ export class TemplatePrintAstProvider {
|
||||
export class TemplatePrintCfgProvider {
|
||||
private cache: CachedOperation<[Uri, Record<string, string>] | undefined>;
|
||||
|
||||
constructor(private cli: CodeQLCliServer, private dbm: DatabaseManager) {
|
||||
constructor(
|
||||
private cli: CodeQLCliServer,
|
||||
private dbm: DatabaseManager,
|
||||
) {
|
||||
this.cache = new CachedOperation<[Uri, Record<string, string>] | undefined>(
|
||||
this.getCfgUri.bind(this),
|
||||
);
|
||||
|
||||
@@ -40,7 +40,10 @@ class QLTestListener extends DisposableObject {
|
||||
export class TestUIService extends TestManagerBase implements TestController {
|
||||
private readonly listeners: Map<TestAdapter, QLTestListener> = new Map();
|
||||
|
||||
public constructor(app: App, private readonly testHub: TestHub) {
|
||||
public constructor(
|
||||
app: App,
|
||||
private readonly testHub: TestHub,
|
||||
) {
|
||||
super(app);
|
||||
|
||||
testHub.registerTestController(this);
|
||||
|
||||
@@ -289,10 +289,13 @@ export async function exportToGist(
|
||||
}
|
||||
|
||||
// Convert markdownFiles to the appropriate format for uploading to gist
|
||||
const gistFiles = markdownFiles.reduce((acc, cur) => {
|
||||
acc[`${cur.fileName}.md`] = { content: cur.content.join("\n") };
|
||||
return acc;
|
||||
}, {} as { [key: string]: { content: string } });
|
||||
const gistFiles = markdownFiles.reduce(
|
||||
(acc, cur) => {
|
||||
acc[`${cur.fileName}.md`] = { content: cur.content.join("\n") };
|
||||
return acc;
|
||||
},
|
||||
{} as { [key: string]: { content: string } },
|
||||
);
|
||||
|
||||
const gistUrl = await createGist(credentials, description, gistFiles);
|
||||
if (gistUrl) {
|
||||
|
||||
@@ -158,8 +158,8 @@ export function filterAndSortRepositoriesWithResults<
|
||||
filterSortState.repositoryIds.length > 0
|
||||
) {
|
||||
return repositories
|
||||
.filter((repo) =>
|
||||
filterSortState.repositoryIds?.includes(repo.repository.id),
|
||||
.filter(
|
||||
(repo) => filterSortState.repositoryIds?.includes(repo.repository.id),
|
||||
)
|
||||
.sort(compareWithResults(filterSortState));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user