summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJavier Tia <[email protected]>2025-09-05 14:53:44 -0600
committerTom Rini <[email protected]>2025-09-16 13:45:00 -0600
commit29f6db89add2a5484ac478ba93d4574bb65ee158 (patch)
tree9f61d35b9e09709ce39e952244ef715ccb2b2111 /scripts
parent1116d915965604c691a9117971cbd8a731615483 (diff)
clang-format: Add configuration file
Introduce .clang-format configuration file to U-Boot, providing significant improvements over the existing scripts/Lindent approach for C code formatting. Benefits of clang-format over scripts/Lindent: - More comprehensive formatting rules: While Lindent relies on the basic 'indent' tool with limited options, clang-format provides extensive control over code formatting with 800+ configuration options - Better handling of complex code structures: clang-format understands modern C constructs and handles nested structures, macros, and complex expressions more intelligently - IDE and editor integration: Native support in major development environments (VS Code, Vim, Emacs, etc.) enables real-time formatting - Consistent results across environments: Eliminates variations between different versions of 'indent' tool and system configurations - Active maintenance: clang-format is actively developed and updated, unlike the aging 'indent' tool Alignment with Linux kernel practices: Continues U-Boot alignment with Linux kernel development practices, maintaining consistency between these closely related projects. The Linux kernel adopted clang-format to modernize its code formatting infrastructure and improve developer experience. The .clang-format file is based on the Linux kernel configuration, specifically copied from Linux kernel v6.16 tag, which itself builds upon the initial introduction in commit d4ef8d3ff005c ("clang-format: add configuration file"). Signed-off-by: Javier Tia <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions