Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

CodeQL fails to detect Javascript/Typescript files

Đang mở
#3,384 0 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, typescript
Lĩnh vực
ci-cd, security

Hướng nghiên cứu

Bắt đầu với nhật ký workflow được liên kết và so sánh hành vi phân tích CodeQL mặc định và nâng cao với tệp .github/codeql/codeql-config.yml của repository, đặc biệt là thiết lập paths của tệp này. Kiểm tra cách bước phân tích xử lý hai tệp TypeScript nằm ngoài thư mục gốc của repository; được xem là hoàn tất khi cấu hình được ghi lại hoặc cấu hình mặc định có thể tìm thấy chúng một cách đáng tin cậy mà không yêu cầu workaround.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
493
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/codeql-action

Tất cả issue của github/codeql-action

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.