[clang-format] always use a line per constructor initialiser for longer lines

This commit is contained in:
phunkyfish 2025-08-10 08:48:28 +01:00
parent b5ec70ea66
commit 08c032f9c8
3 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@ AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign AlignEscapedNewlines: DontAlign
AlignOperands: true AlignOperands: true
AlignTrailingComments: false AlignTrailingComments: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false

View File

@ -216,7 +216,7 @@ set(required_buildtools FlatC
# Optional build tools # Optional build tools
set(optional_buildtools CCache set(optional_buildtools CCache
ClangFormat ClangFormat>=9.0
ClangTidy ClangTidy
Cppcheck Cppcheck
IncludeWhatYouUse) IncludeWhatYouUse)
@ -292,7 +292,7 @@ core_optional_dep(${optional_deps})
core_require_dep(${required_deps}) core_require_dep(${required_deps})
# Check for any libs to be packaged with main app. eg libaacs # Check for any libs to be packaged with main app. eg libaacs
# These libs are not directly linked with main app, but may be used if available from a # These libs are not directly linked with main app, but may be used if available from a
# dependency in the main app. eg libbluray can dyload libaacs for additional features # dependency in the main app. eg libbluray can dyload libaacs for additional features
if(PLATFORM_OPTIONAL_PACKAGES) if(PLATFORM_OPTIONAL_PACKAGES)
core_optional_package_lib(${PLATFORM_OPTIONAL_PACKAGES}) core_optional_package_lib(${PLATFORM_OPTIONAL_PACKAGES})

View File

@ -65,7 +65,7 @@
## 1. Motivation ## 1. Motivation
When working in a large group, the two most important values are readability and maintainability. We code for other people, not computers. To accomplish these goals, we have created a unified set of code conventions. When working in a large group, the two most important values are readability and maintainability. We code for other people, not computers. To accomplish these goals, we have created a unified set of code conventions.
In the repository root directory, there is a [`.clang-format`](https://github.com/xbmc/xbmc/blob/master/.clang-format) file that implements the rules as specified here. You are encouraged to run [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) on any newly created files. It is currently not recommended to do so on preexisting files because all the formatting changes will clutter your commits and pull request. In the repository root directory, there is a [`.clang-format`](https://github.com/xbmc/xbmc/blob/master/.clang-format) file that implements the rules as specified here. You are encouraged to run [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) on any newly created files. It is currently not recommended to do so on preexisting files because all the formatting changes will clutter your commits and pull request. Note that the version of `clang-format` needs to be at least verson 9.0.
When you create a pull request, the PR build job will run `clang-format` on your commits and provide patches for any parts that don't satisfy the current `.clang-format` rules. You should apply these patches and amend your pull request accordingly. When you create a pull request, the PR build job will run `clang-format` on your commits and provide patches for any parts that don't satisfy the current `.clang-format` rules. You should apply these patches and amend your pull request accordingly.