Skip to content

Commit 57139aa

Browse files
committed
Cleaned up most white space issues and many formatting inconsistencies.
This supercedes #428. Please consider the remark added to CONTRIBUTING.md.
1 parent c81c481 commit 57139aa

File tree

80 files changed

+2280
-2270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2280
-2270
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ This project adheres to the [Contributor Covenant 1.2](http://contributor-covena
4343

4444
Please remember that OCMock has been around for 10+ years. Some of the coding conventions used in OCMock may contradict modern guidelines. However, in the interest of keeping the codebase consistent, please respect the conventions used. In particular:
4545

46-
* Opening and closing braces always go on a separate line.
46+
* Use four spaces for indentation.
47+
* Opening and closing braces always go on a separate line (except with blocks).
4748
* No spaces between keywords like `if` and `for` and the following bracket.
4849
* No underscores for instance variables.
4950
* OCMock itself (framework and library) does not use ARC; retains and releases must be sent manually. The unit tests, however, do use ARC.
51+
52+
The repository contains a `.clang-format` file in the actual source directory. This should get you mostly there. Please apply the formatting defined in the config file only to code you add or modify. Please do not apply the formatting to entire files as there are still some inconsistencies in parts of the codebase and certain cases are not formatted correctly by clang-format.
53+
54+

Source/.clang-format

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
BasedOnStyle: WebKit
2+
#AlignConsecutiveDeclarations: true (only in instance var declarations)
3+
AllowShortBlocksOnASingleLine: Never
4+
AllowShortCaseLabelsOnASingleLine: true
5+
AllowShortFunctionsOnASingleLine: Empty
6+
BraceWrapping:
7+
AfterCaseLabel: false
8+
AfterControlStatement: Always
9+
AfterEnum: false
10+
AfterFunction: true
11+
AfterObjCDeclaration: true
12+
AfterStruct: false
13+
AfterUnion: false
14+
BeforeWhile: true
15+
IndentBraces: false
16+
SplitEmptyFunction: true
17+
SplitEmptyRecord: true
18+
BreakBeforeBinaryOperators: None
19+
BreakBeforeBraces: Allman
20+
IncludeCategories:
21+
- Regex: '^<[a-z]*'
22+
Priority: -4
23+
- Regex: '^<NS*'
24+
Priority: -3
25+
- Regex: '^<XC*'
26+
Priority: -2
27+
- Regex: '^"NS*'
28+
Priority: -1
29+
- Regex: '.*'
30+
Priority: 4
31+
IndentCaseLabels: true
32+
MaxEmptyLinesToKeep: 2
33+
ObjCSpaceAfterProperty: false
34+
ObjCSpaceBeforeProtocolList: false
35+
PenaltyBreakAssignment: 50
36+
PenaltyBreakBeforeFirstCallParameter: 50
37+
PointerAlignment: Right
38+
SpaceBeforeParens: Never

0 commit comments

Comments
 (0)