github / github/codeql-cli-binaries
analyzing JS code with annotations
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 1k
- Fork
- 184
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I've been trying to analyze some code from the lumo project. Some of the code contains annotations, see e.g.
https://github.com/anmonteiro/lumo/blob/master/src/js/util.js
which contains code like:
export function expandPath(somePath: string): string {
const tildeExpandedPath = somePath.startsWith('~')
? somePath.replace(/^~/, os.homedir())
: somePath;
return path.resolve(tildeExpandedPath);
}
I have no problem running queries against this project, but when I try to create a test that analyze some code fragments from this project, the extractor fails with a fatal error:
Could not extract a dataset in /Users/franktip/git/ApproximateCallGraphAnalysis/tests/testLumo: Extraction command /Users/franktip/codeql-home/codeql/tools/osx64/java/bin/java failed with status 1
Extraction command /Users/franktip/codeql-home/codeql/tools/osx64/java/bin/java failed with status 1
[1/1] FAILED(EXTRACTION) /Users/franktip/git/ApproximateCallGraphAnalysis/tests/testLumo/reachable.qlref
0 tests passed; 1 tests failed:
FAILED: /Users/franktip/git/ApproximateCallGraphAnalysis/tests/testLumo/reachable.qlref
I have a few questions:
- is there any way to inform the codeql test command that we're analyzing code with annotations?
- can a better error message be produced?
- strangely, the error goes away if I change the file type to ".ts" instead of ".js" (note though that the original project uses the .js extension)
Hướng dẫn đóng góp
Hướng nghiên cứu
Reproduce the failure using tests/testLumo/reachable.qlref and the annotated example in src/js/util.js, then compare the .js and .ts cases described in the report. Trace the extraction command's failure and determine whether annotation support or a more useful diagnostic is required; done means the test no longer fails silently for this input or reports the cause clearly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- compilers, testing
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100