commit | 5ae481581052b996966ef4c3df18afb12b1fbda8 | [log] [tgz] |
---|---|---|
author | Alexander Hansen <alexander.hansen@9elements.com> | Thu Sep 28 20:05:11 2023 +0200 |
committer | Patrick Williams <patrick@stwcx.xyz> | Wed Nov 01 14:13:27 2023 +0000 |
tree | fcfe22c820ee38cfa567051456fa5a11473bcb5d | |
parent | 60fea57cb8fb434fe6d37981fcb5a7f66ad596d0 [diff] |
clang-tidy: propose a base .clang-tidy When there is a specific recommendation, it is taken from Cpp Core guidelines [1] or clang-tidy defaults. - readability-function-size.LineThreshold was chosen to support [ F.3 Keep functions short and simple ] They recommend 60 lines to flag functions which would not fit on a screen. - readability-function-size.ParameterThreshold was chosen to support [ F.2: A function should perform a single logical operation ] They recommend to be suspicious of functions with 7 or more parameters. - readability-function-cognitive-complexity.Threshold was chosen to support [ F.3: Keep functions short and simple ] They recommend a cyclomatic complexity of 10 or less. However, cyclomatic complexity is not implemented in clang-tidy, therefore going with the clang-tidy default. What is the goal of this change? - making it easier for people to read the code. - making it easier to perform refactorings without breaking stuff - making it easier to review changes Who will be responsible for making the required changes? - Everyone who is interested. The plan is to atleast get some of the most important pieces into a more readable state. Examples are dbus-sensors, entity-manager, x86-power-control. - The plan is to enable some of these checks as errors once a repo comes into compliance. After that, contributors will be responsible to ensure their changes meet these checks. Tradeoffs: - There might be more code overall, as functions will be smaller. - People might be required to do another (refactoring) iteration on their changes if some of these checks become hard errors. - Refactoring code to meet these checks might introduce bugs. [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines Change-Id: Icbdd55d2f672037a57d8ed08d52b20427e9e1e4f Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
The OpenBMC project is a Linux Foundation project whose goal is to produce a customizable, open-source firmware stack for Baseboard Management Controllers (BMCs). This repository contains documentation for OpenBMC as a whole. There may be component-specific documentation in the repository for each component.
The features document lists the project's major features with links to more information.
These documents contain details on developing OpenBMC code itself
cheatsheet.md: Quick reference for some common development tasks
CONTRIBUTING.md: Guidelines for contributing to OpenBMC
development tutorials: Tutorials for getting up to speed on OpenBMC development
kernel-development.md: Reference for common kernel development tasks
These documents describe how to use OpenBMC, including using the programmatic interfaces to an OpenBMC system.
code-update: Updating OpenBMC and host platform firmware
console.md: Using the host console
host-management.md: Performing host management tasks with OpenBMC
rest-api.md: Introduction to using the OpenBMC REST API
REDFISH-cheatsheet.md: Quick reference for some common OpenBMC Redfish commands
REST-cheatsheet.md: Quick reference for some common OpenBMC REST API commands