New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in creating a new java pro database #15198
Comments
|
here is another log file database-create-20231223.184948.990.log : |
|
Hi @Xieyufengdd 👋 Thanks for raising this question about the error you're getting! The "Could not detect a suitable build command for the source checkout" error means that CodeQL has not been able to figure out how to build your project. If your project uses Maven, Gradle, Ant, or a custom build script, we should be able to figure out how to build your project in most cases. Can you confirm what type of project you have? If CodeQL cannot figure out how to build your project or you're not using any of the above build systems, you can specify a custom build command. See https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#running-codeql-database-create for details on how to do that. |
Thanks for reply. I used IntelliJ to create it, sorry I didn't find it didn't support, but later I used it to create a database of a single cpp file, it report nearly the same problem "Could not detect a suitable build command", whether it is the same problem? Thanks !!! |
|
Hi @Xieyufengdd, For all compiled languages, we need to know how to build your project. If your projects are just single source files and you don't make use of a build system like Maven/Gradle (for Java) or something like a makefile (for C++), then you should follow the instructions in the documentation I linked to, specifying the command you use to compile your source files as the custom build command. |
when excuting "codeql database create .\compiler-db\ --language=java --source-root=E:\JavaPro\Compiler\src" in command line, it reports:
build-tracer.log is here:
The text was updated successfully, but these errors were encountered: