Skip to content

Commit 09e34d8

Browse files
MurmeleLinuxDevon
authored andcommitted
add clang format
1 parent c88d3c7 commit 09e34d8

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

.clang-format

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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+
7+
# This file got automatically created by ECM, do not edit
8+
# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the config options
9+
# and https://community.kde.org/Policies/Frameworks_Coding_Style#Clang-format_automatic_code_formatting
10+
# for clang-format tips & tricks
11+
---
12+
Language: JavaScript
13+
DisableFormat: true
14+
---
15+
16+
# Style for C++
17+
Language: Cpp
18+
19+
# base is WebKit coding style: https://webkit.org/code-style-guidelines/
20+
# below are only things set that diverge from this style!
21+
BasedOnStyle: WebKit
22+
23+
# enforce C++11 (e.g. for std::vector<std::vector<lala>>
24+
Standard: Cpp11
25+
26+
# 4 spaces indent
27+
TabWidth: 4
28+
IndentWidth: 4
29+
UseTab: Always
30+
31+
SpacesInLineCommentPrefix:
32+
Minimum: 1
33+
Maximum: 1
34+
35+
# 2 * 80 wide lines
36+
ColumnLimit: 160
37+
38+
# sort includes inside line separated groups
39+
SortIncludes: true
40+
41+
# break before braces on function, namespace and class definitions.
42+
BreakBeforeBraces: Custom
43+
BraceWrapping:
44+
AfterClass: false
45+
AfterCaseLabel: false
46+
47+
# CrlInstruction *a;
48+
DerivePointerAlignment: false
49+
PointerAlignment: Left
50+
ReferenceAlignment: Left
51+
52+
# only clang format 14
53+
# RemoveBracesLLVM: true
54+
55+
#QualifierAlignment: Left
56+
57+
# horizontally aligns arguments after an open bracket.
58+
AlignAfterOpenBracket: Align
59+
60+
# don't move all parameters to new line
61+
AllowAllParametersOfDeclarationOnNextLine: false
62+
63+
# no single line functions
64+
AllowShortFunctionsOnASingleLine: None
65+
66+
# always break before you encounter multi line strings
67+
AlwaysBreakBeforeMultilineStrings: true
68+
69+
# don't move arguments to own lines if they are not all on the same
70+
BinPackArguments: false
71+
72+
# don't move parameters to own lines if they are not all on the same
73+
BinPackParameters: false
74+
75+
# In case we have an if statement with multiple lines the operator should be at the beginning of the line
76+
# but we do not want to break assignments
77+
BreakBeforeBinaryOperators: NonAssignment
78+
79+
# format C++11 braced lists like function calls
80+
Cpp11BracedListStyle: true
81+
82+
# do not put a space before C++11 braced lists
83+
SpaceBeforeCpp11BracedList: false
84+
85+
# remove empty lines
86+
KeepEmptyLinesAtTheStartOfBlocks: false
87+
88+
# no namespace indentation to keep indent level low
89+
NamespaceIndentation: None
90+
91+
# we use template< without space.
92+
SpaceAfterTemplateKeyword: false
93+
94+
# Always break after template declaration
95+
AlwaysBreakTemplateDeclarations: true
96+
97+
# macros for which the opening brace stays attached.
98+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE , wl_resource_for_each, wl_resource_for_each_safe ]
99+
100+
# keep lambda formatting multi-line if not empty
101+
AllowShortLambdasOnASingleLine: Empty
102+
103+
# We do not want clang-format to put all arguments on a new line
104+
AllowAllArgumentsOnNextLine: false

0 commit comments

Comments
 (0)