Skip to content

Commit cbef28c

Browse files
authored
enhance "no source code was seen"
1 parent d637f8f commit cbef28c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

troubleshooting/codeql-builds/compiled-languages.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ alternatively we can further define limits
5858
```
5959
6060
### "CodeQL scanned 0 out of ... files in this job" or "No source code was seen during the build" or "failed with exit code 32"
61+
For compiled languages, CodeQL operates by tracing compiler commands for each file to construct a database representation of the codebase. However, some build engines utilize background daemons to compile applications, and these delegated compiler calls to a daemon may go undetected by the CodeQL tracer, resulting in little or no code being detected.
6162
62-
Helpful articles here are:
63+
Additionally, CodeQL will only trace and scan files that pass through a compiler within the build systems. Files pulled from a cache, rather than processed by the build systems, won't be included in the CodeQL database. To ensure a comprehensive representation of the codebase, it's essential to disable build caching and shared compilation. Refer to your build system's recommended flags, as described here: [specifying build commands](https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/#specifying-build-commands).
64+
65+
Other helpful articles:
6366
- [Troubleshooting: Error: "No source code was seen during the build"](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/no-source-code-seen-during-build) walks through the various reasons why this might occur.
6467
- [Build Customizations](#build-customizations) provides guidance for supported build steps per language / build engine.
6568
- [CodeQL Exit Codes - 32](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/exit-codes#32)

0 commit comments

Comments
 (0)