Skip to content

Commit cff235c

Browse files
author
Dave Bartolomeo
committed
Auto-format
1 parent 1089a05 commit cff235c

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

extensions/ql-vscode/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ export class CodeQLCliServer implements Disposable {
690690
* @param inputPath The path of an evaluation event log.
691691
* @param outputPath The path to write a JSON summary of it to.
692692
*/
693-
async generateJsonLogSummary(
693+
async generateJsonLogSummary(
694694
inputPath: string,
695695
outputPath: string
696696
): Promise<string> {

extensions/ql-vscode/src/log-insights/join-order.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ interface Bucket {
128128
tupleCounts: Int32Array;
129129
resultSize: number;
130130
dependentPredicateSizes: I.Map<string, number>;
131-
};
131+
}
132132

133133
class JoinOrderScanner implements EvaluationLogScanner {
134134
// Map a predicate hash to its result size
@@ -289,9 +289,9 @@ class JoinOrderScanner implements EvaluationLogScanner {
289289
...sccEvents.map(e => e.predicateIterationMillis.length)
290290
);
291291

292-
for (var iteration = 0; iteration < maxIteration; ++iteration) {
292+
for (let iteration = 0; iteration < maxIteration; ++iteration) {
293293
// Loop through each predicate in this iteration
294-
for (var predicate = 0; predicate < sccEvents.length; ++predicate) {
294+
for (let predicate = 0; predicate < sccEvents.length; ++predicate) {
295295
const inLayerEvent = sccEvents[predicate];
296296
const iterationTime =
297297
inLayerEvent.predicateIterationMillis.length <= iteration
@@ -349,14 +349,14 @@ class JoinOrderScanner implements EvaluationLogScanner {
349349
const dependentPredicates = getDependentPredicates(
350350
inLayerEvent.ra[raReference]
351351
);
352-
var dependentPredicateSizes: I.Map<string, number>;
352+
let dependentPredicateSizes: I.Map<string, number>;
353353
// We treat the base case as a non-recursive pipeline. In that case, the dependent predicates are
354354
// the dependencies of the base case and the cur_deltas.
355355
if (raReference === 'base') {
356356
dependentPredicateSizes = I.Map(
357357
dependentPredicates.map((pred): [string, number] => {
358358
// A base case cannot contain a `prev_delta`, but it can contain a `cur_delta`.
359-
var size = 0;
359+
let size = 0;
360360
if (pred.endsWith('#cur_delta')) {
361361
size = this.curDeltaSizes(
362362
event,

extensions/ql-vscode/src/log-insights/summary-parser.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ export async function generateSummarySymbols(fileLocation: string): Promise<Summ
5151
};
5252

5353
const lines = summary.split(/\r?\n/);
54-
var lineNumber = 0;
54+
let lineNumber = 0;
5555
while (lineNumber < lines.length) {
5656
const startLineNumber = lineNumber;
5757
lineNumber++;
5858
const startLine = lines[startLineNumber];
5959
const nonRecursiveMatch = startLine.match(NON_RECURSIVE_TUPLE_COUNT_REGEXP);
60-
var predicateName: string | undefined = undefined;
61-
var iteration: number = 0;
60+
let predicateName: string | undefined = undefined;
61+
let iteration = 0;
6262
if (nonRecursiveMatch) {
6363
predicateName = nonRecursiveMatch.groups!.predicateName;
6464
} else {
@@ -71,7 +71,7 @@ export async function generateSummarySymbols(fileLocation: string): Promise<Summ
7171

7272
if (predicateName !== undefined) {
7373
const raStartLine = lineNumber;
74-
var raEndLine: number | undefined = undefined;
74+
let raEndLine: number | undefined = undefined;
7575
while ((lineNumber < lines.length) && (raEndLine === undefined)) {
7676
const raLine = lines[lineNumber];
7777
const returnMatch = raLine.match(RETURN_REGEXP);
@@ -83,7 +83,7 @@ export async function generateSummarySymbols(fileLocation: string): Promise<Summ
8383
if (raEndLine === undefined) {
8484
raEndLine = lineNumber - 1;
8585
}
86-
var symbol = symbols.predicates[predicateName];
86+
let symbol = symbols.predicates[predicateName];
8787
if (symbol === undefined) {
8888
symbol = {
8989
iterations: {}

extensions/ql-vscode/src/pure/messages.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ export interface ClearCacheParams {
650650
/**
651651
* Parameters to start a new structured log
652652
*/
653-
export interface StartLogParams {
653+
export interface StartLogParams {
654654
/**
655655
* The dataset for which we want to start a new structured log
656656
*/
@@ -664,7 +664,7 @@ export interface ClearCacheParams {
664664
/**
665665
* Parameters to terminate a structured log
666666
*/
667-
export interface EndLogParams {
667+
export interface EndLogParams {
668668
/**
669669
* The dataset for which we want to terminated the log
670670
*/
@@ -1070,12 +1070,12 @@ export const compileUpgradeSequence = new rpc.RequestType<WithProgressId<Compile
10701070
/**
10711071
* Start a new structured log in the evaluator, terminating the previous one if it exists
10721072
*/
1073-
export const startLog = new rpc.RequestType<WithProgressId<StartLogParams>, StartLogResult, void, void>('evaluation/startLog');
1073+
export const startLog = new rpc.RequestType<WithProgressId<StartLogParams>, StartLogResult, void, void>('evaluation/startLog');
10741074

10751075
/**
10761076
* Terminate a structured log in the evaluator. Is a no-op if we aren't logging to the given location
10771077
*/
1078-
export const endLog = new rpc.RequestType<WithProgressId<EndLogParams>, EndLogResult, void, void>('evaluation/endLog');
1078+
export const endLog = new rpc.RequestType<WithProgressId<EndLogParams>, EndLogResult, void, void>('evaluation/endLog');
10791079

10801080
/**
10811081
* Clear the cache of a dataset

extensions/ql-vscode/src/query-history.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class ProblemReporter implements EvaluationLogProblemReporter {
327327
public reportProblem(predicateName: string, raHash: string, iteration: number, message: string): void {
328328
const nameWithHash = predicateSymbolKey(predicateName, raHash);
329329
const predicateSymbol = this.symbols?.predicates[nameWithHash];
330-
var predicateInfo: PipelineInfo | undefined = undefined;
330+
let predicateInfo: PipelineInfo | undefined = undefined;
331331
if (predicateSymbol !== undefined) {
332332
predicateInfo = predicateSymbol.iterations[iteration];
333333
}
@@ -1082,7 +1082,7 @@ export class QueryHistoryManager extends DisposableObject {
10821082
* @returns An array of `Diagnostic`s representing the problems found by scanners.
10831083
*/
10841084
private async scanLog(jsonSummaryLocation: string, symbolsLocation: string | undefined): Promise<Diagnostic[]> {
1085-
var symbols: SummarySymbols | undefined = undefined;
1085+
let symbols: SummarySymbols | undefined = undefined;
10861086
if (symbolsLocation !== undefined) {
10871087
symbols = JSON.parse(await fs.readFile(symbolsLocation, { encoding: 'utf-8' }));
10881088
}

extensions/ql-vscode/src/run-queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export class QueryEvaluationInfo {
347347
/**
348348
* Holds if this query already has a completed structured evaluator log
349349
*/
350-
async hasEvalLog(): Promise<boolean> {
350+
async hasEvalLog(): Promise<boolean> {
351351
return fs.pathExists(this.evalLogPath);
352352
}
353353

0 commit comments

Comments
 (0)