Skip to content

Commit 130d3c0

Browse files
committed
build: Enable linting in the build
1 parent bb28daf commit 130d3c0

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ jobs:
6262
npm run build-ci
6363
shell: bash
6464

65+
- name: Lint
66+
run: |
67+
cd extensions/ql-vscode
68+
npm run lint
69+
6570
- name: Install CodeQL
6671
run: |
6772
mkdir codeql-home

extensions/ql-vscode/src/databases.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,8 @@ function eventFired<T>(event: vscode.Event<T>, timeoutMs = 1000): Promise<T | un
440440
dispose();
441441
});
442442
function dispose() {
443-
if (timeout !== undefined) {
444-
clearTimeout(timeout);
445-
}
446-
if (disposable !== undefined) {
447-
disposable.dispose();
448-
}
443+
clearTimeout(timeout);
444+
disposable.dispose();
449445
}
450446
});
451447
}

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,22 @@ function getQuickQueriesDir(ctx: ExtensionContext): string {
7171
}
7272

7373

74-
function updateQuickQueryDir(queriesDir: string, index: number, len: number) {
75-
workspace.updateWorkspaceFolders(
76-
index,
77-
len,
78-
{ uri: Uri.file(queriesDir), name: QUICK_QUERY_WORKSPACE_FOLDER_NAME }
79-
);
80-
}
8174

8275

8376
/**
8477
* Show a buffer the user can enter a simple query into.
8578
*/
8679
export async function displayQuickQuery(ctx: ExtensionContext, cliServer: CodeQLCliServer, databaseUI: DatabaseUI) {
87-
try {
8880

81+
function updateQuickQueryDir(queriesDir: string, index: number, len: number) {
82+
workspace.updateWorkspaceFolders(
83+
index,
84+
len,
85+
{ uri: Uri.file(queriesDir), name: QUICK_QUERY_WORKSPACE_FOLDER_NAME }
86+
);
87+
}
88+
89+
try {
8990
const workspaceFolders = workspace.workspaceFolders || [];
9091
const queriesDir = await getQuickQueriesDir(ctx);
9192

0 commit comments

Comments
 (0)