Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Eisenberg <[email protected]>
  • Loading branch information
reitowo and aeisenberg authored Nov 19, 2024
1 parent d45792c commit f62a177
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@
},
{
"command": "codeQL.chooseDatabaseFoldersParent",
"title": "CodeQL: Choose Parent Folder and import all databases directly contained in it"
"title": "CodeQL: Import All Databases Directly Contained in a Parent Folder"
},
{
"command": "codeQL.chooseDatabaseArchive",
Expand Down
14 changes: 7 additions & 7 deletions extensions/ql-vscode/src/databases/local-databases-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export class DatabaseUI extends DisposableObject {
await this.chooseDatabasesParentFolder(progress);
},
{
title: "Choose a Parent Folder contains all Databases to import",
title: "Importing all databases contained in parent folder",
},
);
}
Expand Down Expand Up @@ -973,7 +973,7 @@ export class DatabaseUI extends DisposableObject {

/**
* Import database from uri. Returns the imported database, or `undefined` if the
* operation was unsuccessful.
* operation was unsuccessful or canceled.
*/
private async importDatabase(
uri: Uri,
Expand Down Expand Up @@ -1041,13 +1041,13 @@ export class DatabaseUI extends DisposableObject {
progress({
step: index + 1,
maxStep: entries.length,
message: `Importing ${entry[0]} (${p.step}/${p.maxStep}): ${p.message}`,
message: `Importing '${entry[0]}' (${p.step}/${p.maxStep}): ${p.message}`,
});
};

if (!validFileTypes.includes(entry[1])) {
void this.app.logger.log(
`Skip import ${entry}, invalid FileType: ${entry[1]}`,
`Skipping import for '${entry}', invalid file type: ${entry[1]}`,
);
continue;
}
Expand All @@ -1066,8 +1066,8 @@ export class DatabaseUI extends DisposableObject {
} else {
failures.push(entry[0]);
}
} catch {
failures.push(entry[0]);
} catch (e) {
failures.push(`${entry[0]}: ${toErrorMessag(e)}`);
}
}

Expand All @@ -1076,7 +1076,7 @@ export class DatabaseUI extends DisposableObject {
this.app.logger,
`Failed to import ${failures.length} database(s), successfully imported ${databases.length} database(s).`,
{
fullMessage: `Failed to import ${failures.length} database(s), successfully imported ${databases.length} database(s).\nFailed databases to import:\n - ${failures.join("\n - ")}`,
fullMessage: `Failed to import ${failures.length} database(s), successfully imported ${databases.length} database(s).\nFailed databases:\n - ${failures.join("\n - ")}`,
},
);
} else if (databases.length === 0) {
Expand Down

0 comments on commit f62a177

Please sign in to comment.