CodeQL fails to detect Javascript/Typescript files
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- github-actions, typescript
Rechercherichtung
Beginnen Sie mit dem verknüpften Workflow-Log und vergleichen Sie das Verhalten der standardmäßigen und erweiterten CodeQL-Analyse mit der Datei .github/codeql/codeql-config.yml des Repositorys, insbesondere mit deren paths-Einstellung. Prüfen Sie, wie der Analyseschritt die beiden TypeScript-Dateien außerhalb des Repository-Roots behandelt; als erledigt sollte gelten, dass die dokumentierte oder standardmäßige Konfiguration sie zuverlässig findet, ohne den Workaround zu erfordern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I was trying to get CodeQL running on the following repo:
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:
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.6k
- Forks
- 493
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 44
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/codeql-action
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/codeql-action#4052 · 4 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
github/codeql-action#4078 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
github/codeql-action#4008 · 9 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
github/codeql-action#3978 · 4 Kommentare · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
github/codeql-action#3915 · 6 Kommentare · 3 Reaktionen ·
Alle Issues in github/codeql-action
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
mksglu/context-mode#1200 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
anthropics/claude-code#96687 ·
-
good first issue
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
AOSSIE-Org/DebateAI#582 · 2 Kommentare ·