Add support for viewing unit test databases with the AST viewer

Aperta
#2,277 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
typescript, vscode
Ambito
devtools

Direzione di ricerca

Inizia riproducendo il workflow dei test unitari nell’estensione VS Code di CodeQL e traccia il modo in cui il visualizzatore AST gestisce i database importati. Il lavoro è completato quando è possibile importare un database di test unitari e visualizzarne l’AST del codice sorgente senza il workaround manuale dell’archivio e della cartella; l’issue conferma solo i test su Windows, quindi è necessario verificare anche il comportamento su Linux e macOS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
539
Fork
240
Merge medio
2g 6h
PR unite (30g)
29

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/vscode-codeql

Tutte le issue di github/vscode-codeql

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.