Add support for viewing unit test databases with the AST viewer
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- typescript, vscode
- 领域
- devtools
调研方向
首先在 CodeQL VS Code 扩展中复现单元测试工作流,并跟踪 AST 查看器如何处理导入的数据库。完成的标准是:无需手动进行归档和文件夹的变通操作,即可导入单元测试数据库并查看其源代码 AST;该 issue 仅确认了在 Windows 上的测试,因此还需要检查 Linux 和 macOS 上的行为。
由索引模型根据 Issue 内容生成。
描述
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:
- Run the unit test using the unit test tab in VS Code.
- Navigate to the unit test path. You will see a XYZ.testproj folder.
- Remove .testproj from the folder name
- Navigate to XYZ/src and zip the folder inside. Rename to src.zip
- Move the newly created src.zip to the XYZ unit test directory
- Delete the src/ folder
- 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 小时
- 30 天内合并 PR
- 29
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-codeql 的其他 Issue
-
bug VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#4471 · 1 条评论 ·
-
bug enhancement VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#592 · 2 条评论 ·
-
enhancement VSCode
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-codeql#4432 · 1 条评论 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-codeql#4339 · 1 条评论 ·
查看 github/vscode-codeql 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
vicharanashala/fln#563 ·