Skip to content

Commit 531340e

Browse files
authored
Update docs to add build-mode: none analysis for C/C++ (#55889)
1 parent f8d318a commit 531340e

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,15 @@ If you added manual build steps for compiled languages and {% data variables.pro
308308

309309
## Building C/C++
310310

311-
{% ifversion codeql-no-build %}{% data variables.product.prodname_codeql %} supports build modes `autobuild` or `manual` for C/C++ code.
311+
{% ifversion codeql-no-build %}{% data variables.product.prodname_codeql %} supports build modes {% ifversion codeql-no-build-c-cpp %}`none`, {% endif %}`autobuild` or `manual` for C/C++ code.
312+
313+
{% ifversion codeql-no-build-c-cpp %}
314+
315+
When you enable default setup for a repository that contains C/C++ code, the build mode is set to `none` automatically.
316+
317+
>[!NOTE] Support of build mode `none` for C/C++ codebases is currently in {% data variables.release-phases.public_preview %} and subject to change.
318+
319+
{% endif %}
312320

313321
### Autobuild summary for C/C++{% endif %}
314322

content/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ In addition, for {% data variables.code-scanning.no_build_support %}, there is a
201201
The {% data variables.product.prodname_codeql_cli %} includes autobuilders for {% data variables.code-scanning.compiled_languages %} code. {% data variables.product.prodname_codeql %} autobuilders allow you to build projects for compiled languages without specifying any build commands. When an autobuilder is invoked, {% data variables.product.prodname_codeql %} examines the source for evidence of a build system and attempts to run the optimal set of commands required to extract a database. For more information, see [AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-autobuild).
202202

203203
An autobuilder is invoked automatically when you execute `codeql database create` for a compiled language if you don’t include a
204-
`--command` option{% ifversion codeql-no-build %} or set `--build-mode none`{% endif %}. For example, for a C/C++ codebase, you could simply run:
204+
`--command` option{% ifversion codeql-no-build %} or set `--build-mode none`{% endif %}. For example, for a Swift codebase, you could simply run:
205205

206206
```shell
207-
codeql database create --language=cpp <output-folder>/cpp-database
207+
codeql database create --language=swift <output-folder>/swift-database
208208
```
209209

210210
If a codebase uses a standard build system, relying on an autobuilder is often the simplest way to create a database. For sources that require non-standard build steps, you may need to explicitly define each step in the command line.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Reference: #16543 (C/C++ public preview)
2+
3+
versions:
4+
fpt: '*'
5+
ghec: '*'

data/variables/code-scanning.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ codeql_workflow: 'CodeQL analysis workflow'
77
tool_status_page: 'tool status page'
88

99
# List of compiled languages supported for `no-build` extraction
10-
no_build_support: '{% ifversion codeql-no-build-csharp %}C# and{% endif %} Java'
10+
no_build_support: '{% ifversion codeql-no-build-c-cpp %}C/C++, {% endif %}{% ifversion codeql-no-build-csharp %}C# and{% endif %} Java'
1111

1212
# List of compiled languages
1313
compiled_languages: 'C/C++, C#, Go, Java, Kotlin, and Swift'

0 commit comments

Comments
 (0)