File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed
Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,12 @@ assignees: ''
1010** Describe the bug**
1111A clear and concise description of what the bug is.
1212
13- ** To Reproduce**
13+ ** Version**
14+ The CodeQL and VS Code version in which the bug occurs.
15+ <!-- To copy version information for the CodeQL extension, click "CodeQL CLI vX.X.X" in the status bar at the bottom of the screen.
16+ To copy detailed version information for VS Code itself, see https://code.visualstudio.com/docs/supporting/FAQ#_how-do-i-find-the-version. -->
17+
18+ ** To reproduce**
1419Steps to reproduce the behavior.
1520
1621** Expected behavior**
Original file line number Diff line number Diff line change 242242 "command" : " codeQL.openDocumentation" ,
243243 "title" : " CodeQL: Open Documentation"
244244 },
245+ {
246+ "command" : " codeQL.copyVersion" ,
247+ "title" : " CodeQL: Copy Version Information"
248+ },
245249 {
246250 "command" : " codeQLDatabases.chooseDatabaseFolder" ,
247251 "title" : " Choose Database from Folder" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 window
1414} from 'vscode' ;
1515import { LanguageClient } from 'vscode-languageclient' ;
16+ import * as os from 'os' ;
1617import * as path from 'path' ;
1718import { testExplorerExtensionId , TestHub } from 'vscode-test-adapter-api' ;
1819
@@ -700,6 +701,14 @@ async function activateWithInstalledDistribution(
700701 commandRunner ( 'codeQL.openDocumentation' , async ( ) =>
701702 env . openExternal ( Uri . parse ( 'https://codeql.github.com/docs/' ) ) ) ) ;
702703
704+ ctx . subscriptions . push (
705+ commandRunner ( 'codeQL.copyVersion' , async ( ) => {
706+ const text = `CodeQL extension version: ${ extension ?. packageJSON . version } \nCodeQL CLI version: ${ await cliServer . getVersion ( ) } \nPlatform: ${ os . platform ( ) } ${ os . arch ( ) } ` ;
707+ env . clipboard . writeText ( text ) ;
708+ helpers . showAndLogInformationMessage ( text ) ;
709+ } ) ) ;
710+
711+
703712 logger . log ( 'Starting language server.' ) ;
704713 ctx . subscriptions . push ( client . start ( ) ) ;
705714
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export class CodeQlStatusBarHandler extends DisposableObject {
1919 this . push ( this . item ) ;
2020 this . push ( workspace . onDidChangeConfiguration ( this . handleDidChangeConfiguration , this ) ) ;
2121 this . push ( distributionConfigListener . onDidChangeConfiguration ( ( ) => this . updateStatusItem ( ) ) ) ;
22- this . item . command = 'codeQL.openDocumentation ' ;
22+ this . item . command = 'codeQL.copyVersion ' ;
2323 this . updateStatusItem ( ) ;
2424 }
2525
@@ -37,7 +37,7 @@ export class CodeQlStatusBarHandler extends DisposableObject {
3737
3838 private async updateStatusItem ( ) {
3939 const canary = CANARY_FEATURES . getValue ( ) ? ' (Canary)' : '' ;
40- // since getting the verison may take a few seconds, initialize with some
40+ // since getting the version may take a few seconds, initialize with some
4141 // meaningful text.
4242 this . item . text = `CodeQL${ canary } ` ;
4343
You can’t perform that action at this time.
0 commit comments