Disable codeql test commands from the command palette
These commands are not applicable from the global context. They require an argument to be passed in. So, they should be hidden in the command palette.
This commit is contained in:
@@ -355,11 +355,11 @@
|
||||
},
|
||||
{
|
||||
"command": "codeQLTests.showOutputDifferences",
|
||||
"title": "CodeQL: Show Test Output Differences"
|
||||
"title": "Show Test Output Differences"
|
||||
},
|
||||
{
|
||||
"command": "codeQLTests.acceptOutput",
|
||||
"title": "CodeQL: Accept Test Output"
|
||||
"title": "Accept Test Output"
|
||||
},
|
||||
{
|
||||
"command": "codeQLAstViewer.gotoCode",
|
||||
@@ -628,6 +628,14 @@
|
||||
{
|
||||
"command": "codeQLAstViewer.clear",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "codeQLTests.acceptOutput",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "codeQLTests.showOutputDifferences",
|
||||
"when": "false"
|
||||
}
|
||||
],
|
||||
"editor/context": [
|
||||
|
||||
@@ -32,7 +32,6 @@ describe('commands declared in package.json', function() {
|
||||
if (
|
||||
command.match(/^codeQL\./)
|
||||
|| command.match(/^codeQLQueryResults\./)
|
||||
|| command.match(/^codeQLTests\./)
|
||||
) {
|
||||
paletteCmds.add(command);
|
||||
expect(title).not.to.be.undefined;
|
||||
@@ -42,6 +41,7 @@ describe('commands declared in package.json', function() {
|
||||
command.match(/^codeQLDatabases\./)
|
||||
|| command.match(/^codeQLQueryHistory\./)
|
||||
|| command.match(/^codeQLAstViewer\./)
|
||||
|| command.match(/^codeQLTests\./)
|
||||
) {
|
||||
scopedCmds.add(command);
|
||||
expect(title).not.to.be.undefined;
|
||||
@@ -69,8 +69,6 @@ describe('commands declared in package.json', function() {
|
||||
disabledInPalette.add(commandDecl.command);
|
||||
});
|
||||
|
||||
|
||||
|
||||
it('should have commands appropriately prefixed', function() {
|
||||
paletteCmds.forEach(command => {
|
||||
expect(commandTitles[command], `command ${command} should be prefixed with 'CodeQL: ', since it is accessible from the command palette`).to.match(/^CodeQL: /);
|
||||
|
||||
Reference in New Issue
Block a user