zephyr/doc
Carles Cufi 3c420a4828 checkpatch: Adapt the braces check to Zephyr
scripts/checkpatch.pl was written originally for the Linux kernel, and
its code reflects the kernel's coding style. In particular, it has
checks for unneeded braces around single-statement if/else/for/while
conditions. In Zephyr however, braces are always required, and so the
checks needed modifying to verify the opposite condition.

In order to enable the now-compatible checks, we also remove the
--ignore BRACES statement in .checkpatch.conf.

Limitations: the current code works well if there are not conditional
statements (e.g. #if, #ifdef or #endif) next to the if/else/for/while
conditions. This is rarely the case, but triggers with the Bluetooth
controller in code like this:

```
 #if defined(CONFIG_BT_PERIPHERAL)
        if (!lll->is_hdcd)
 #endif /* CONFIG_BT_PERIPHERAL */
        {
```

```
        } else
 #endif /* CONFIG_BT_CTLR_PRIVACY */
        {

```

```
 #if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
        if (lll->cte_started) {
                radio_switch_complete(phy_s, 0, phy_s, 0);
        } else
 #endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
        {
```

```
 #ifdef DUAL_BANK
        while ((FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW) ||
               (FLASH_STM32_REGS(dev)->SR2 & FLASH_SR_QW))
 #else
        while (FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW)
 #endif
        {
```

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-12-30 21:46:47 +01:00
..
_doxygen doc: kernel: define additional doxygen groups 2024-09-17 05:24:09 -04:00
_extensions/zephyr doc: _extensions: apply ruff lint rules 2024-11-26 15:43:52 -05:00
_scripts doc: _scripts: conf: apply ruff lint rules 2024-11-26 15:43:52 -05:00
_static doc: css: boards: fix font size for board name 2024-11-27 10:37:54 -05:00
_templates doc: enable three-way dark-mode switch 2024-10-16 16:33:24 +01:00
build doc: build: snippets: Add sysbuild usage 2024-12-27 07:18:13 +01:00
connectivity tests: bluetooth: shell: add a2dp new features test 2024-12-23 09:15:35 +01:00
contribute checkpatch: Adapt the braces check to Zephyr 2024-12-30 21:46:47 +01:00
develop west: runners: bossac: Honor --erase flag 2024-12-22 18:20:30 +00:00
hardware doc: porting: add note about CDC ACM UART configuration 2024-12-20 12:36:31 +01:00
images
introduction doc: clarify what a subsystem is 2024-05-14 10:55:55 +02:00
kernel kernel: k_msgq_put should trigger reschedule 2024-12-14 01:04:43 +01:00
project doc: process: cleanup required checks section 2024-12-03 04:01:27 +01:00
releases doc: release: 4.1: add CONFIG_FILE_SYSTEM_SHELL_MOUNT_COMMAND 2024-12-29 05:49:58 +01:00
safety doc: safety: Extend safety overview with IEC 61508 infomation 2024-09-26 03:34:06 -04:00
security doc: security: Disclose CVE-2024-8798 2024-12-16 04:46:33 +01:00
services modules: nanopb: Move pip dependencies to optional module 2024-12-19 15:20:11 +01:00
templates doc: boards: extensions: introduce zephyr:board role and directive 2024-10-22 14:11:27 +02:00
404.rst
CMakeLists.txt doc: get output folder from environment 2024-09-25 13:49:34 -05:00
conf.py doc: releases: remove v3.6.0 from the list of supported releases 2024-12-10 11:08:20 +01:00
glossary.rst doc: sphinx-lint: fix bad usage of "default role" 2024-09-13 11:42:51 -05:00
index-tex.rst doc: pdf: Add Glossary of Terms to PDF output 2023-11-13 12:17:51 -05:00
index.rst doc: reorder tiles 2024-12-25 12:41:09 +01:00
kconfig.rst
LICENSING.rst doc: LICENSING: Add BSD-3-clause for OpenThread files 2024-11-27 10:37:21 -05:00
Makefile doc: add make html-live and html-live-fast 2024-08-26 17:05:39 +02:00
requirements.txt doc: requirements: Update to Sphinx RTD Theme 3.0 2024-10-14 13:02:20 +02:00
substitutions.txt
zephyr.doxyfile.in net: sockets: Remove deperecated CONFIG_NET_SOCKETS_POSIX_NAMES 2024-12-04 12:09:51 +01:00