.clang-format 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ---
  2. # SPDX-FileCopyrightText: 2019 Christoph Cullmann <cullmann@kde.org>
  3. # SPDX-FileCopyrightText: 2019 Gernot Gebhard <gebhard@absint.com>
  4. #
  5. # SPDX-License-Identifier: MIT
  6. # This file got automatically created by ECM, do not edit
  7. # See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the config options
  8. # and https://community.kde.org/Policies/Frameworks_Coding_Style#Clang-format_automatic_code_formatting
  9. # for clang-format tips & tricks
  10. ---
  11. Language: JavaScript
  12. DisableFormat: true
  13. ---
  14. # Style for C++
  15. Language: Cpp
  16. # base is WebKit coding style: https://webkit.org/code-style-guidelines/
  17. # below are only things set that diverge from this style!
  18. BasedOnStyle: WebKit
  19. # enforce C++11 (e.g. for std::vector<std::vector<lala>>
  20. Standard: Cpp11
  21. # 4 spaces indent
  22. TabWidth: 4
  23. # 2 * 80 wide lines
  24. ColumnLimit: 160
  25. # sort includes inside line separated groups
  26. SortIncludes: true
  27. # break before braces on function, namespace and class definitions.
  28. BreakBeforeBraces: Linux
  29. # CrlInstruction *a;
  30. PointerAlignment: Right
  31. # horizontally aligns arguments after an open bracket.
  32. AlignAfterOpenBracket: Align
  33. # don't move all parameters to new line
  34. AllowAllParametersOfDeclarationOnNextLine: false
  35. # no single line functions
  36. AllowShortFunctionsOnASingleLine: None
  37. # always break before you encounter multi line strings
  38. AlwaysBreakBeforeMultilineStrings: true
  39. # don't move arguments to own lines if they are not all on the same
  40. BinPackArguments: false
  41. # don't move parameters to own lines if they are not all on the same
  42. BinPackParameters: false
  43. # In case we have an if statement with multiple lines the operator should be at the beginning of the line
  44. # but we do not want to break assignments
  45. BreakBeforeBinaryOperators: NonAssignment
  46. # format C++11 braced lists like function calls
  47. Cpp11BracedListStyle: true
  48. # do not put a space before C++11 braced lists
  49. SpaceBeforeCpp11BracedList: false
  50. # remove empty lines
  51. KeepEmptyLinesAtTheStartOfBlocks: false
  52. # no namespace indentation to keep indent level low
  53. NamespaceIndentation: None
  54. # we use template< without space.
  55. SpaceAfterTemplateKeyword: false
  56. # Always break after template declaration
  57. AlwaysBreakTemplateDeclarations: true
  58. # macros for which the opening brace stays attached.
  59. ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE , wl_resource_for_each, wl_resource_for_each_safe ]
  60. # keep lambda formatting multi-line if not empty
  61. AllowShortLambdasOnASingleLine: Empty
  62. # We do not want clang-format to put all arguments on a new line
  63. AllowAllArgumentsOnNextLine: false