Skip to content

Commit ff3c221

Browse files
committed
Problem: whitespace style too restrictive.
For header only library like cppzmq, whitespace style inherited from libzmq is too restrictive. Solution: relaxing whitespace before parens from always to in control statements only, increased max column width from 80 to 85 and removing requirement of whitespace after template keyword.
1 parent 590cf71 commit ff3c221

File tree

12 files changed

+947
-1008
lines changed

12 files changed

+947
-1008
lines changed

.clang-format

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ AllowShortBlocksOnASingleLine: false
2626
AllowAllParametersOfDeclarationOnNextLine: true
2727
AllowShortFunctionsOnASingleLine: InlineOnly
2828
AlwaysBreakTemplateDeclarations: false
29-
ColumnLimit: 80
29+
ColumnLimit: 85
3030
MaxEmptyLinesToKeep: 2
3131
KeepEmptyLinesAtTheStartOfBlocks: false
3232
ContinuationIndentWidth: 2
3333
PointerAlignment: Right
3434
ReflowComments: false
3535
SpaceBeforeAssignmentOperators: true
36-
SpaceBeforeParens: Always
36+
SpaceBeforeParens: ControlStatements
3737
SpaceInEmptyParentheses: false
3838
SpacesInAngles: false
3939
SpacesInParentheses: false
@@ -44,7 +44,7 @@ SortIncludes: false
4444

4545
FixNamespaceComments: false
4646
BreakBeforeBinaryOperators: NonAssignment
47-
SpaceAfterTemplateKeyword: true
47+
SpaceAfterTemplateKeyword: false
4848
AlignAfterOpenBracket: Align
4949
AlignOperands: true
5050
BreakConstructorInitializers: AfterColon

demo/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <zmq.hpp>
22

3-
int main (int argc, char **argv)
3+
int main(int argc, char **argv)
44
{
55
zmq::context_t context;
66
return 0;

0 commit comments

Comments
 (0)