Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CodeQL fails to detect Javascript/Typescript files

Aperta
#3,384 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, typescript
Ambito
ci-cd, security

Direzione di ricerca

Inizia dal log del workflow collegato e confronta il comportamento dell’analisi CodeQL predefinita e avanzata con il file .github/codeql/codeql-config.yml del repository, in particolare la sua impostazione paths. Verifica come il passaggio di analisi gestisce i due file TypeScript al di fuori della radice del repository; il lavoro dovrebbe considerarsi completato quando la configurazione documentata o predefinita li individua in modo affidabile senza richiedere il workaround.

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

Descrizione

I was trying to get CodeQL running on the following repo:

https://github.com/jessehouwing/azure-pipelines-msbuild-helper-task/tree/a3aeaf4b459f1912ccf4706d0e0c93a16a4d5ed0

But Code QL analysis fails to find any Javascript / Typescript files. Neither in "default mode" nor in "advanced mode".

[2026-01-05 08:48:07] [build-stderr] Only found JavaScript or TypeScript files that were empty or contained syntax errors.

A workflow log can be found here:
https://github.com/jessehouwing/azure-pipelines-msbuild-helper-task/actions/runs/20710231226/job/59448894856

It is unclear from the error message and from the docs why i can't find any files, because there are 2 Typescript files in the repo, but they aren't in the root (which I suspect is causing the issue).

I managed to resolve this by adding a codeql-config.yml and specifying the paths property to include **/*.ts:

https://github.com/jessehouwing/azure-pipelines-msbuild-helper-task/blob/main/.github/codeql/codeql-config.yml

I don't see why I would have to do this. CodeQL should detect **/*.js, **/*.ts and a few other extensions by default if you'd ask me.

Either the docs should clearly specify how do solve this situation (the docs currently do not contain an entry for this specific error message). But it would be even better if the analysis step would pick a decent set of default search options when it can't find a project.json in the root of the repo.

Lingua principale
TypeScript
Stelle
1.6k
Fork
493
Merge medio
1g 13h
PR unite (30g)
44

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/codeql-action

Tutte le issue di github/codeql-action

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.