Add support for viewing unit test databases with the AST viewer

オープン
#2,277 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript, vscode
領域
devtools

調査の方向性

まず CodeQL VS Code 拡張機能でユニットテストのワークフローを再現し、AST ビューアーがインポートされたデータベースをどのように処理するかを追跡します。手動でアーカイブとフォルダーを用意する回避策なしに、ユニットテスト用データベースをインポートしてそのソース AST を表示できれば完了です。この issue で確認されているのは Windows でのテストだけなので、Linux と macOS での動作も確認する必要があります。

索引モデルが issue の本文から書いたものです。

説明

enhancement VSCode

Is your feature request related to a problem? Please describe.
When developing CodeQL queries, it is convenient to write unit tests and query the database that is output from running them to iteratively test/develop a query. The alternative is to maintain a separate project and database which increases the number of moving parts and commands that need to be run when altering code or building additional tests and debugging. Currently you can import a unit test database using the CodeQL extension, however you will not be able to view the AST of its source code.

The current workaround is cumbersome and time consuming, it would be great if it could be automatically handled by the extension.

Describe the solution you'd like
Unit test databases imported by CodeQL VSCode extension should be able to have their AST viewed without performing extra steps.

Describe alternatives you've considered
Currently, the work around looks like this:

  1. Run the unit test using the unit test tab in VS Code.
  2. Navigate to the unit test path. You will see a XYZ.testproj folder.
  3. Remove .testproj from the folder name
  4. Navigate to XYZ/src and zip the folder inside. Rename to src.zip
  5. Move the newly created src.zip to the XYZ unit test directory
  6. Delete the src/ folder
  7. Import the database with the CodeQL extension. You will now be able to view the AST.

Additional context
I have only tested this on Windows, I am unsure of if the existing workaround works on Linux or MacOS.

主要言語
TypeScript
スター
539
フォーク
240
平均マージ
2日 6時間
マージ済み PR(30日)
29

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/vscode-codeql のほかの issue

github/vscode-codeql の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。