Automatically fix ESLint violations
This commit is contained in:
@@ -195,9 +195,8 @@ export class DistributionManager implements DistributionProvider {
|
||||
|
||||
if (process.env.PATH) {
|
||||
for (const searchDirectory of process.env.PATH.split(delimiter)) {
|
||||
const expectedLauncherPath = await getExecutableFromDirectory(
|
||||
searchDirectory,
|
||||
);
|
||||
const expectedLauncherPath =
|
||||
await getExecutableFromDirectory(searchDirectory);
|
||||
if (expectedLauncherPath) {
|
||||
return {
|
||||
codeQlPath: expectedLauncherPath,
|
||||
|
||||
@@ -424,9 +424,8 @@ export class DatabaseManager extends DisposableObject {
|
||||
step: ++step,
|
||||
});
|
||||
|
||||
const databaseItem = await this.createDatabaseItemFromPersistedState(
|
||||
database,
|
||||
);
|
||||
const databaseItem =
|
||||
await this.createDatabaseItemFromPersistedState(database);
|
||||
try {
|
||||
await this.refreshDatabase(databaseItem);
|
||||
await this.registerDatabase(databaseItem);
|
||||
|
||||
@@ -507,9 +507,8 @@ export class SkeletonQueryWizard {
|
||||
): Promise<DatabaseItem | undefined> {
|
||||
const defaultDatabaseNwo = QUERY_LANGUAGE_TO_DATABASE_REPO[language];
|
||||
|
||||
const dbItems = await SkeletonQueryWizard.sortDatabaseItemsByDateAdded(
|
||||
databaseItems,
|
||||
);
|
||||
const dbItems =
|
||||
await SkeletonQueryWizard.sortDatabaseItemsByDateAdded(databaseItems);
|
||||
|
||||
const defaultDatabaseItem = await SkeletonQueryWizard.findDatabaseItemByNwo(
|
||||
language,
|
||||
|
||||
@@ -85,9 +85,8 @@ export async function runAutoModelQueries({
|
||||
// CodeQL needs to have access to the database to be able to retrieve the
|
||||
// snippets from it. The source location prefix is used to determine the
|
||||
// base path of the database.
|
||||
const sourceLocationPrefix = await databaseItem.getSourceLocationPrefix(
|
||||
cliServer,
|
||||
);
|
||||
const sourceLocationPrefix =
|
||||
await databaseItem.getSourceLocationPrefix(cliServer);
|
||||
const sourceArchiveUri = databaseItem.sourceArchive;
|
||||
const sourceInfo =
|
||||
sourceArchiveUri === undefined
|
||||
|
||||
@@ -482,9 +482,8 @@ export class ModelEditorView extends AbstractWebview<
|
||||
// In application mode, we need the database of a specific library to generate
|
||||
// the modeled methods. In framework mode, we'll use the current database.
|
||||
if (mode === Mode.Application) {
|
||||
addedDatabase = await this.promptChooseNewOrExistingDatabase(
|
||||
progress,
|
||||
);
|
||||
addedDatabase =
|
||||
await this.promptChooseNewOrExistingDatabase(progress);
|
||||
if (!addedDatabase) {
|
||||
return;
|
||||
}
|
||||
@@ -562,9 +561,8 @@ export class ModelEditorView extends AbstractWebview<
|
||||
|
||||
private async modelDependency(): Promise<void> {
|
||||
return withProgress(async (progress, token) => {
|
||||
const addedDatabase = await this.promptChooseNewOrExistingDatabase(
|
||||
progress,
|
||||
);
|
||||
const addedDatabase =
|
||||
await this.promptChooseNewOrExistingDatabase(progress);
|
||||
if (!addedDatabase || token.isCancellationRequested) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,9 +45,8 @@ export async function exportVariantAnalysisResults(
|
||||
): Promise<void> {
|
||||
await withProgress(
|
||||
async (progress: ProgressCallback, token: CancellationToken) => {
|
||||
const variantAnalysis = await variantAnalysisManager.getVariantAnalysis(
|
||||
variantAnalysisId,
|
||||
);
|
||||
const variantAnalysis =
|
||||
await variantAnalysisManager.getVariantAnalysis(variantAnalysisId);
|
||||
if (!variantAnalysis) {
|
||||
void extLogger.log(
|
||||
`Could not find variant analysis with id ${variantAnalysisId}`,
|
||||
@@ -61,9 +60,8 @@ export async function exportVariantAnalysisResults(
|
||||
throw new UserCancellationException("Cancelled");
|
||||
}
|
||||
|
||||
const repoStates = await variantAnalysisManager.getRepoStates(
|
||||
variantAnalysisId,
|
||||
);
|
||||
const repoStates =
|
||||
await variantAnalysisManager.getRepoStates(variantAnalysisId);
|
||||
|
||||
void extLogger.log(
|
||||
`Exporting variant analysis results for variant analysis with id ${variantAnalysis.id}`,
|
||||
|
||||
@@ -183,9 +183,8 @@ async function copyExistingQueryPack(
|
||||
if (
|
||||
await cliServer.cliConstraints.supportsGenerateExtensiblePredicateMetadata()
|
||||
) {
|
||||
const metadata = await cliServer.generateExtensiblePredicateMetadata(
|
||||
originalPackRoot,
|
||||
);
|
||||
const metadata =
|
||||
await cliServer.generateExtensiblePredicateMetadata(originalPackRoot);
|
||||
metadata.extensible_predicates.forEach((predicate) => {
|
||||
if (predicate.path.endsWith(".ql")) {
|
||||
toCopy.push(join(originalPackRoot, predicate.path));
|
||||
|
||||
@@ -21,9 +21,8 @@ export const createVariantAnalysisContentProvider = (
|
||||
}
|
||||
const variantAnalysisId = parseInt(variantAnalysisIdString);
|
||||
|
||||
const variantAnalysis = await variantAnalysisManager.getVariantAnalysis(
|
||||
variantAnalysisId,
|
||||
);
|
||||
const variantAnalysis =
|
||||
await variantAnalysisManager.getVariantAnalysis(variantAnalysisId);
|
||||
if (!variantAnalysis) {
|
||||
void showAndLogWarningMessage(
|
||||
extLogger,
|
||||
|
||||
@@ -180,9 +180,8 @@ export class VariantAnalysisResultsManager extends DisposableObject {
|
||||
repositoryFullName,
|
||||
);
|
||||
|
||||
const repoTask: VariantAnalysisRepositoryTask = await readRepoTask(
|
||||
storageDirectory,
|
||||
);
|
||||
const repoTask: VariantAnalysisRepositoryTask =
|
||||
await readRepoTask(storageDirectory);
|
||||
|
||||
if (!repoTask.databaseCommitSha || !repoTask.sourceLocationPrefix) {
|
||||
throw new Error("Missing database commit SHA");
|
||||
|
||||
Reference in New Issue
Block a user