github / vscode-codeql

An extension for Visual Studio Code that adds rich language support for CodeQL
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-codeql
MIT License
426 stars 188 forks source link

Allow CodeQL databases to be specified in the workspace #502

Open aeisenberg opened 4 years ago

aeisenberg commented 4 years ago

Is your feature request related to a problem? Please describe.

In order to facilitate workspace sharing (e.g., for CodeQL trainings and CTF), it would be great if we could have a workspace that is already set up to work on a database without having the user do any configuration.

It's already partially possible through codespaces. Users can start working with almost no extra configuration. The only thing that the user needs to do is add a database. Through a Codespaces docker file, it's already possible for the database to be available in the file system.

This task is about adding this database directly to the workspace on load.

Describe the solution you'd like

One possible way to do this is to use VS Code settings. Something like:

{
  ...
  "codeQL.preloadedDatabases": [
    "/var/opt/db1",  "/var/opt/db1"
  ],
  ...
}

And then on load, the extension will add the database at that path. Possibly, all successfully added databases will be removed.

Manouchehri commented 3 years ago

This is also going to be very useful for us VS Code Remote users, who use multiple different clients.