summaryrefslogtreecommitdiff
path: root/.clang-format
AgeCommit message (Collapse)Author
2021-10-28clang-format: Enable `BreakBeforeTernaryOperators`Rémi Verschelde
clang-format keeps breaking the way it handles break *after* ternary operators, so I give up and go with the only style they seem to actually test.
2021-10-28clang-format: Disable alignment of operands, too unreliableRémi Verschelde
Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
2021-10-22clang-format: Sync config with LLVM 13Rémi Verschelde
Disable minimum amount of spaces in comment prefix for now, as it otherwise modifies the whole codebase. That's something we probably want to use as it matches our convention, but we should look into fully converting these comments to our style guide at the same time.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-06clang-format: Add JavaImportGroups for Java codeRémi Verschelde
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2019-02-09clang-format: Set standard for ObjC++Rémi Verschelde
2018-07-18Style: Format code with clang-format 6.0.1Rémi Verschelde
2017-12-10Style: Apply clang-format to Java filesRémi Verschelde
Only those from org/godotengine/godot though, not the thirdparty ones.
2017-12-07Style: Update definitions for clang-format 5.0.0Rémi Verschelde
This will be the new standard from now on.
2017-02-11Style: Add .clang-format based on LLVM styleRémi Verschelde
Adapted some parameters to fit the de facto Godot style as closely as possible (tab indentation, long lines with no wrapping - for now -, indented case labels, left-aligned pointer operators).