doc: Update U-Boot coding style guide with clang-format usage
authorJavier Tia <javier.tia@linaro.org>
Fri, 5 Sep 2025 20:53:47 +0000 (14:53 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 16 Sep 2025 19:45:00 +0000 (13:45 -0600)
commita9d997685a400e1a08d60056177aefcd159bc2af
treedaf4e453df488a15a667a1449c8f75851270dd39
parent1b5a8ff3fdf607656097761174abe4b7473b89db
doc: Update U-Boot coding style guide with clang-format usage

The U-Boot coding style guide has been updated to include information
about using the `.clang-format` configuration file for automatic code
formatting. This ensures consistent formatting across the entire
codebase and aligns with Linux kernel coding standards. The goal with
introducing a predefined coding style is consistency rather than
personal preference.

The .clang-format file is copied directly from the Linux kernel without
any modifications, ensuring complete compatibility with kernel coding
standards.

Include comprehensive best practices for using clang-format,
specifically guidance on formatting only changed blocks versus entire
files, creating separate formatting-only commits for better code review,
and leveraging git clang-format for targeted formatting. Add examples of
editor integrations. This enhancement will help maintainers and
contributors to easily adhere to U-Boot coding standards.

Signed-off-by: Javier Tia <javier.tia@linaro.org>
doc/develop/codingstyle.rst