User should be able to generate a database from the current workspace

Open
#306 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript, vscode
Domain
cli, database, devtools

Research direction

Start with the proposed CodeQL: Create database from workspace command and the discussion linked in the issue. Clarify how the extension should obtain the language, invoke the CLI's database create command, choose a location, import the result, update databases, and provide QL packs before identifying the relevant extension entry points.

Written by the indexing model from the issue text.

Description

Complexity: High enhancement VSCode

There is no easy way for a user to create a database locally if the only version of the cli installed is the default extension's version. The reason is that there is no easy way for a user to determine the file system path to the executable.

Instead, the extension should offer a mechanism to generate a database from the current workspace.

My idea is this:

  1. User executes the CodeQL: Create database from workspace command
  2. vscode opens an input box to request the language of the database
  3. the cli invokes the database create command with the given language and placed in a well-known location (perhaps specified in configuration)
  4. After creating the database, it is automatically imported into the workspace

Open questions:

  1. How do we handle database updating? Perhaps there is another command that the user needs to run and it is done manually? Perhaps it can be performed in the background on a schedule?
  2. How do we add the appropriate ql packs so that the user can run queries? Can we download them and import into the project?

See https://github.com/orgs/github/teams/codeql-core/discussions/1 for a longer discussion on this.

Dominant language
TypeScript
Stars
539
Forks
240
Avg merge
2d 6h
Merged PRs (30d)
29

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/vscode-codeql

All issues in github/vscode-codeql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.