> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/languages/c-family/analysis-modes.md).

# Analysis modes

Presentation of the several analysis modes in SonarQube Server 2026.5.

The analysis can operate in *Automatic Configuration* (AutoConfig) or *Manual Configuration* (Compilation Database) modes.

AutoConfig is activated by default, while the Compilation Database can be activated by supplying a `compile_commands.json` to the SonarScanner.

The analyzer must understand the code’s intended compilation options to ensure an accurate static analysis of the CFamily code.

* In Compilation Database mode, these options are provided to the analyzer through [Compilation Database](https://clang.llvm.org/docs/JSONCompilationDatabase.html): a JSON file introduced by the LLVM project.
* In AutoConfig mode, the analyzer attempts to deduce these options automatically, so you don't need to select a compiler manually or run Build Wrapper. A set of high-level AutoConfig properties can tune the automatic deduction process. See the "AutoConfig-specific properties" section in [Customizing the analysis](/sonarqube-server/analyzing-source-code/languages/c-family/customizing-the-analysis.md).

## Choosing the right analysis mode <a href="#choosing-the-right-analysis-mode" id="choosing-the-right-analysis-mode"></a>

AutoConfig mode is recommended if:

* Your projects use compilers that don’t meet the supported compiler prerequisites of Compilation Database mode.
* Your projects use compilation environments where generating a compilation database is not feasible (see [Prerequisites](/sonarqube-server/analyzing-source-code/languages/c-family/prerequisites.md)).
* You desire a swift analysis setup without the need to allocate human resources for the generation and maintenance of the Compilation Database.
* Your projects have a low CFamily code percentage.

Compilation Database mode is recommended if:

* You seek the highest CFamily analysis quality SonarQube Server can provide. Please note that in rare instances, AutoConfig may result in some issues being overlooked.
* You want to have finer control over the analysis configuration. For example, if you want to analyze a specific build variant or several variants (see "Analyzing code variants" in [Customizing the analysis](/sonarqube-server/analyzing-source-code/languages/c-family/customizing-the-analysis.md)).
* You have projects with Objective-C code: Objective-C analysis is not supported in AutoConfig mode.
* You require MISRA compliance. The [MISRA Compliance 2020](https://www.misra.org.uk/app/uploads/2021/06/MISRA-Compliance-2020.pdf) document (section 2.6.5) mandates explicit configuration of implementation-defined behavior, which AutoConfig cannot guarantee. MISRA and MISRA C are the registered trade marks of [The MISRA Consortium Limited](https://misra.org.uk/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/languages/c-family/analysis-modes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
