aboutsummaryrefslogtreecommitdiffstats
path: root/_clang-format
Commit message (Collapse)AuthorAgeFilesLines
* Add .proto files format to _clang-formatAlexey Edelev2023-09-111-0/+6
| | | | | | | | | Use the Google format with 4 indents. Change-Id: I852fabc07e16c19ac5555e4b34400a1c94a9d1d3 Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* clang-format: Add space after template keywordMårten Nordheim2023-08-221-2/+2
| | | | | | | simple git grep-ing shows more uses of _with_ space than without Change-Id: I0b2d94aa6312dd6856a2b886bc7ec028978dc0cf Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* clang-format: codify some of our conventionsMårten Nordheim2022-09-281-0/+17
| | | | | | | | | | | | | | | | | | 1. We tend to use 2 spaces for indenting pre-processor directives, when we do it. Unfortunately clang-format also counts header-guards so not really recommended to use blindly on a header... 2. Add comments to namespaces, since the closing brace is simply a brace with no further decoration. 3. Attach escaped new-lines on the left (instead of current: right). Where 'right' will add the '\' characters on the far-right of our column limit, 'left' will put them as far left as it can while having them vertically aligned. Change-Id: Ib5a836c76f7761d743e0100c83e7db609b959249 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Make sure clang-format doesn't reformat SPDX-License-IdentifierKai Köhne2022-06-141-3/+4
| | | | | | | | | SPDX-License-Identifier needs to stay on one line to be machine readable, even if this goes above the 100 chars limit. Pick-to: 6.4 Change-Id: I2cc3d556e30e8d169224cc87a97a2042b47e43f7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix C++ version to C++17Kai Köhne2022-06-081-1/+1
| | | | | | | | | | | Cpp11 is nowadays a deprecated alias to LS_Latest https://clang.llvm.org/docs/ClangFormatStyleOptions.html So we might as well hard-code it to C++ 17. Change-Id: If832c6075f9e30c340a2ac8bb3b7fe13afc0f56e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update _clang_format to avoid adding a space in list-initializationLuca Di Sera2022-02-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current style specification for clang-format will add a space between an identifier and an initializer_list in list-initialization. For example: ``` auto foo{bar}; ``` Would be modified to: ``` auto foo {bar}; ``` The Qt Style Guidelines (https://wiki.qt.io/Qt_Coding_Style) do not seem to dictate anything about this case, while dictating about a general use of scope-delimiting braces that, arguably, does not apply here. Following a rationale that is similar to the one in Google's C++ Style Guide (https://google.github.io/styleguide/cppguide.html#Braced_Initializer_List_Format), "SpaceBeforeCpp11BracedList" is now set to false to avoid the addition of the aforementioned space. Change-Id: Ic499994a24293a634858889352c717248b8d11e3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update _clang-format definitionPaul Wicking2019-12-181-0/+3
| | | | | | | | Add indentation for preprocessor directives if/ifdef/endif as this is commonly used across Qt. Change-Id: I0ce9851cc0861b8d18cb3717d695c871169db239 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-03-141-3/+5
|\ | | | | | | | | | | | | Conflicts: coin/provisioning/common/linux/emsdk.sh Change-Id: I9ba6a1c52b70b605f0f856b6ce6912fd499792a3
| * Update comment in clang-format filePaul Wicking2019-03-111-1/+2
| | | | | | | | | | | | Change-Id: I18f14a1956f508317f8a3995873a14bc1af29594 Reviewed-by: Andy Maloney <asmaloney@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Update clang-format configPaul Wicking2019-03-081-2/+3
| | | | | | | | | | | | | | | | | | | | Set column width to 100 as described in the official Qt coding style (https://wiki.qt.io/Qt_Coding_Style). Also, break constructor initializers before the colon and after the commas. Change-Id: I6ac5a21ce831a35a0d74e699192ba981c8a8ba3c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Fix handling of structs by clang formatJędrzej Nowacki2018-11-301-1/+1
|/ | | | | | | | | | | | | | | | | | | Our coding style expects classes to have opening braces on a new line. Structs and classes are the same. Before the patch: struct Foo { ... }; After the patch: struct Foo { ... }; Change-Id: Ifab8a402d03ef2fd75b939f39274887feedc7b1b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* _clang-format: indent initializers with four spaces, not eightFrederik Gladhorn2018-08-301-2/+2
| | | | | | Change-Id: I9fc644554bd326a3a54163072b7b9e06253a5ff2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Move _clang-format from qtrepotoolsFrederik Gladhorn2018-07-191-0/+80
Change-Id: I9ccacaf6ed09bbc0ee3f55bf6f97d96976341d14 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>