Fix failing test and remove changelog note

This commit is contained in:
Andrew Eisenberg
2021-11-19 10:54:12 -08:00
parent 4c83805030
commit d9c5ecf462
3 changed files with 15 additions and 17 deletions

View File

@@ -10,7 +10,6 @@
- Add a _CodeQL: Preview Query Help_ command to generate Markdown previews of `.qhelp` query help files. This command should only be run in trusted workspaces. See https://codeql.github.com/docs/codeql-cli/testing-query-help-files for more information about query help. [#988](https://github.com/github/vscode-codeql/pull/988)
- Make "Open Referenced File" command accessible from the active editor menu. [#989](https://github.com/github/vscode-codeql/pull/989)
- Allow query result locations with 0 as the end column value. These are treated as the first column in the line. [#1002](https://github.com/github/vscode-codeql/pull/1002)
- Change remote query support so that query files that are not in the root of the query pack can be uploaded and run. [#1009](https://github.com/github/vscode-codeql/pull/1009)
## 1.5.6 - 07 October 2021

View File

@@ -21,7 +21,7 @@ interface QlPack {
name: string;
version: string;
dependencies: { [key: string]: string };
defaultSuite?: Record<string, unknown>;
defaultSuite?: Record<string, unknown>[];
defaultSuiteFile?: Record<string, unknown>;
}
interface RepoListQuickPickItem extends QuickPickItem {
@@ -439,13 +439,13 @@ export async function attemptRerun(
*/
async function fixDefaultSuite(queryPackDir: string, packRelativePath: string): Promise<void> {
const packPath = path.join(queryPackDir, 'qlpack.yml');
const qlpack = (await yaml.safeLoad(await fs.readFile(packPath, 'utf8'))) as QlPack;
delete qlpack.defaultSuite;
const qlpack = yaml.safeLoad(await fs.readFile(packPath, 'utf8')) as QlPack;
delete qlpack.defaultSuiteFile;
qlpack.defaultSuite = {
description: 'Query suite for remote query',
query: packRelativePath
};
qlpack.defaultSuite = [{
description: 'Query suite for remote query'
}, {
query: packRelativePath.replace('\\', '/')
}];
await fs.writeFile(packPath, yaml.safeDump(qlpack));
}

View File

@@ -250,8 +250,9 @@ describe('Remote queries', function() {
},
library: false,
defaultSuite: [{
description: 'Query suite for remote query',
query: queryPath,
description: 'Query suite for remote query'
}, {
query: queryPath
}]
});
}
@@ -261,12 +262,10 @@ describe('Remote queries', function() {
}
function printDirectoryContents(dir: string) {
dir;
// uncomment to debug
// console.log(`DIR ${dir}`);
// if (!fs.existsSync(dir)) {
// console.log(`DIR ${dir} does not exist`);
// }
// fs.readdirSync(dir).sort().forEach(f => console.log(` ${f}`));
console.log(`DIR ${dir}`);
if (!fs.existsSync(dir)) {
console.log(`DIR ${dir} does not exist`);
}
fs.readdirSync(dir).sort().forEach(f => console.log(` ${f}`));
}
});