CodeQL fails to detect Javascript/Typescript files
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- github-actions, typescript
Research direction
Start with the linked workflow log and compare the default and advanced CodeQL analysis behavior with the repository's .github/codeql/codeql-config.yml, especially its paths setting. Check how the analysis step handles the two TypeScript files outside the repository root; done should mean the documented or default configuration reliably finds them without requiring the workaround.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 493
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/codeql-action
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/codeql-action#4052 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
github/codeql-action#4078 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
github/codeql-action#4008 · 9 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
github/codeql-action#3978 · 4 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
github/codeql-action#3915 · 6 comments · 3 reactions ·
All issues in github/codeql-action
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·