Skip to content

Commit 1b007c2

Browse files
reitowoaeisenberg
andcommitted
Apply suggestions from code review
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
1 parent 1f6a7af commit 1b007c2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

extensions/ql-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@
841841
},
842842
{
843843
"command": "codeQL.chooseDatabaseFoldersParent",
844-
"title": "CodeQL: Choose Parent Folder and import all databases directly contained in it"
844+
"title": "CodeQL: Import All Databases Directly Contained in a Parent Folder"
845845
},
846846
{
847847
"command": "codeQL.chooseDatabaseArchive",

extensions/ql-vscode/src/databases/local-databases-ui.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ export class DatabaseUI extends DisposableObject {
369369
await this.chooseDatabasesParentFolder(progress);
370370
},
371371
{
372-
title: "Choose a Parent Folder contains all Databases to import",
372+
title: "Importing all databases contained in parent folder",
373373
},
374374
);
375375
}
@@ -973,7 +973,7 @@ export class DatabaseUI extends DisposableObject {
973973

974974
/**
975975
* Import database from uri. Returns the imported database, or `undefined` if the
976-
* operation was unsuccessful.
976+
* operation was unsuccessful or canceled.
977977
*/
978978
private async importDatabase(
979979
uri: Uri,
@@ -1041,13 +1041,13 @@ export class DatabaseUI extends DisposableObject {
10411041
progress({
10421042
step: index + 1,
10431043
maxStep: entries.length,
1044-
message: `Importing ${entry[0]} (${p.step}/${p.maxStep}): ${p.message}`,
1044+
message: `Importing '${entry[0]}' (${p.step}/${p.maxStep}): ${p.message}`,
10451045
});
10461046
};
10471047

10481048
if (!validFileTypes.includes(entry[1])) {
10491049
void this.app.logger.log(
1050-
`Skip import ${entry}, invalid FileType: ${entry[1]}`,
1050+
`Skipping import for '${entry}', invalid file type: ${entry[1]}`,
10511051
);
10521052
continue;
10531053
}
@@ -1066,8 +1066,8 @@ export class DatabaseUI extends DisposableObject {
10661066
} else {
10671067
failures.push(entry[0]);
10681068
}
1069-
} catch {
1070-
failures.push(entry[0]);
1069+
} catch (e) {
1070+
failures.push(`${entry[0]}: ${toErrorMessag(e)}`);
10711071
}
10721072
}
10731073

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

0 commit comments

Comments
 (0)