summaryrefslogtreecommitdiff
path: root/.clang-format
AgeCommit message (Collapse)AuthorFilesLines
2023-10-24clang-format: copy latest and re-formatPatrick Williams1-9/+15
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository. Change-Id: I2f9540cf0d545a2da4d6289fc87b754f684bc9a7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2023-05-11clang-format: copy latest and re-formatPatrick Williams1-6/+19
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository. Change-Id: I75f89d2959b0f1338c20d72ad669fbdc1d720835 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2022-06-01Try to fix the lambda formatting issueEd Tanous1-0/+1
clang-tidy has a setting, LambdaBodyIndentation, which it says: "For callback-heavy code, it may improve readability to have the signature indented two levels and to use OuterScope." bmcweb is very callback heavy code. Try to enable it and see if that improves things. There are many cases where the length of a lambda call will change, and reindent the entire lambda function. This is really bad for code reviews, as it's difficult to see the lines changed. This commit should resolve it. This does have the downside of reindenting a lot of functions, which is unfortunate, but probably worth it in the long run. All changes except for the .clang-format file were made by the robot. Tested: Code compiles, whitespace changes only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib4aa2f1391fada981febd25b67dcdb9143827f43
2021-11-19Update clang-formatGeorge Liu1-1/+1
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format `Don't break long string literals` Tested: built bmcweb successfully and RedfishValidator Passed. Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ib58f7c942fd3838592e043c57e0b6ffcdc3d963b
2020-06-11clang-format: update to latest from docs repoGunnar Mills1-12/+28
This is from openbmc/docs/style/cpp/.clang-format Other OpenBMC repos are doing the same. Tested: Built and validator passed. Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-05-22clang-format: Add AfterCaseLabel option from clang-10Gunnar Mills1-0/+1
Seeing code format CI fails. Caused by the recent move to clang-format-10: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-build-scripts/+/32639 Added to the clang-format reference file here: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/32696 Tested: None. Change-Id: I268ab08d01d40963792d1df4499c65ce039b605b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2018-09-05Move to clang-format-6.0Ed Tanous1-39/+40
This commit moves the codebase to the lastest clang-format file from upstream, as well as clang-format-6.0. Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2018-07-27Move over to upstream c++ styleEd Tanous1-3/+2
This patchset moves bmcweb over to the upstream style naming conventions for variables, classes, and functions, as well as imposes the latest clang-format file. This changeset was mostly built automatically by the included .clang-tidy file, which has the ability to autoformat and auto rename variables. At some point in the future I would like to see this in greater use, but for now, we will impose it on bmcweb, and see how it goes. Tested: Code still compiles, and appears to run, although other issues are possible and likely. Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2017-06-07incrementalEd Tanous1-2/+1
2017-04-25incrementalEd Tanous1-2/+11
2017-04-18incrementalEd Tanous1-1/+1
2017-04-18KVM WORKING! ! !Ed Tanous1-1/+1
2017-03-21incrementalEd Tanous1-1/+1
2017-03-04clang-formatEd Tanous1-0/+90