I argue that calling createOctokit(false) adds no benefit. If an authenticated session already exists then this silently create an octokit, which makes getOctokit() a no-op just returning the field. However if there is already an authenticated session then getOctokit() would already be able to create an octokit without prompting the user. On the other hand if there isn't an authenticated session then we won't be able to pre-populate an octokit, so getOctokit() will have to prompt the user anyway. Not calling createOctokit(false) in registerListeners also doesn't change behaviour. If the user is authenticated in the new session then we would be able to create an octokit instance wihtout prompting in getOctokit anyway. If the user is not authenticated in the new session then we won't be able to create an instance without prompting either way. The only benefit I can think of is that it moves a tiny amount of computation earlier in the pipeline, but the amount of computation is tiny and it isn't any more async than it would be if it happened in getOctokit(). I don't think this is worth making the code more complex.
CodeQL for Visual Studio Code
This project is an extension for Visual Studio Code that adds rich language support for CodeQL. It's used to find problems in code bases using CodeQL. It's written primarily in TypeScript.
The extension is released. You can download it from the Visual Studio Marketplace.
To see what has changed in the last few versions of the extension, see the Changelog.
Features
- Enables you to use CodeQL to query databases and discover problems in codebases.
- Shows the flow of data through the results of path queries, which is essential for triaging security results.
- Provides an easy way to run queries from the large, open source repository of CodeQL security queries.
- Adds IntelliSense to support you writing and editing your own CodeQL query and library files.
Project goals and scope
This project will track new feature development in CodeQL and, whenever appropriate, bring that functionality to the Visual Studio Code experience.
Dependencies
This extension depends on the following two extensions for required functionality. They will be installed automatically when you install VS Code CodeQL.
Contributing
This project welcomes contributions. See CONTRIBUTING.md for details on how to build, install, and contribute.
License
The CodeQL extension for Visual Studio Code is licensed under the MIT License. The version of CodeQL used by the CodeQL extension is subject to the CodeQL Research Terms & Conditions.
When using the GitHub logos, be sure to follow the GitHub logo guidelines.