Are successful builds (for compiled languages like Java) a pre requisite for code scanning (GHAS) ? #67855
-
Select Topic AreaQuestion BodyCode scanning performs autobuilds before CodeQL analysis.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
CodeQL intercepts the compiler calls (e.g.
Not yet, but this is a feature we are working on for Java. This "buildless" mode is likely to work as good as the compiled mode for many projects. However, the "compiled" mode is sometimes better because it has access to the exact dependencies and can also analyse code that is generated by the build process.
No, CodeQL does not use the built artifact, so this would not work. Having completed the build already may even cause problems, because many buildtools will skip compilation steps if the build artifacts are already present. As a result CodeQL won't see any source code, because there are no compiler calls. |
Beta Was this translation helpful? Give feedback.
CodeQL intercepts the compiler calls (e.g.
javac) to figure out which files are part of the project, and their dependencies (jar files). This provides CodeQL with the most accurate picture of which source files belong together and the libraries on which they depend.Not yet, but this is a feature we are working on for Java. This "buildless" mode is likely to work as good as the compiled mode for many projects. However, the "compiled" mode is sometimes better because it has access to the exact dependencies and can also analyse code…