Skip to content

Commit

Permalink
Merging format branch
Browse files Browse the repository at this point in the history
  • Loading branch information
frankus committed Dec 16, 2015
2 parents 8424414 + 4c18605 commit d9a000d
Show file tree
Hide file tree
Showing 202 changed files with 2,848 additions and 2,517 deletions.
71 changes: 71 additions & 0 deletions .clang-format
@@ -0,0 +1,71 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4

AlignAfterOpenBracket: false
AlignEscapedNewlinesLeft: true
AlignOperands: false
AlignTrailingComments: true

AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortLoopsOnASingleLine: true

AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false

BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false

BinPackArguments: true
BinPackParameters: true
ColumnLimit: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: Inner
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 10000
PenaltyBreakComment: 300
PenaltyBreakString: 10000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Right
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
Standard: Auto
IndentWidth: 4
TabWidth: 4
UseTab: Always
BreakBeforeBraces: Attach

SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
SpacesInContainerLiterals: false
SpaceBeforeAssignmentOperators: true

ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
...
6 changes: 1 addition & 5 deletions .gitignore
Expand Up @@ -12,10 +12,6 @@ xcuserdata/

# OSX noise
.DS_Store
profile

# Emacs noise
*~

# other noise
.svn

18 changes: 8 additions & 10 deletions ApptentiveConnect/ext/OCMock/OCMock/OCMStubRecorder.h
Expand Up @@ -18,6 +18,7 @@
#import <OCMock/OCMFunctions.h>
#import <objc/runtime.h>


@interface OCMStubRecorder : OCMRecorder

- (id)andReturn:(id)anObject;
Expand All @@ -39,26 +40,23 @@
if (OCMIsObjectType(@encode(__typeof(_val)))) { \
objc_setAssociatedObject(_nsval, "OCMAssociatedBoxedValue", *(__unsafe_unretained id *) (void *) &_val, OBJC_ASSOCIATION_RETAIN); \
} \
_nsval; \
_nsval; \
}))
@property (nonatomic, readonly) OCMStubRecorder *(^ _andReturn)(NSValue *);
@property (readonly, nonatomic) OCMStubRecorder * (^_andReturn)(NSValue *);

#define andThrow(anException) _andThrow(anException)
@property (nonatomic, readonly) OCMStubRecorder *(^ _andThrow)(NSException *);
@property (readonly, nonatomic) OCMStubRecorder * (^_andThrow)(NSException *);

#define andPost(aNotification) _andPost(aNotification)
@property (nonatomic, readonly) OCMStubRecorder *(^ _andPost)(NSNotification *);
@property (readonly, nonatomic) OCMStubRecorder * (^_andPost)(NSNotification *);

#define andCall(anObject, aSelector) _andCall(anObject, aSelector)
@property (nonatomic, readonly) OCMStubRecorder *(^ _andCall)(id, SEL);
@property (readonly, nonatomic) OCMStubRecorder * (^_andCall)(id, SEL);

#define andDo(aBlock) _andDo(aBlock)
@property (nonatomic, readonly) OCMStubRecorder *(^ _andDo)(void (^)(NSInvocation *));
@property (readonly, nonatomic) OCMStubRecorder * (^_andDo)(void (^)(NSInvocation *));

#define andForwardToRealObject() _andForwardToRealObject()
@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void);
@property (readonly, nonatomic) OCMStubRecorder * (^_andForwardToRealObject)(void);

@end



18 changes: 9 additions & 9 deletions ApptentiveConnect/source/ATConnect.h
Expand Up @@ -16,9 +16,9 @@
#define kATConnectVersionString @"2.1.0"

#if TARGET_OS_IPHONE
# define kATConnectPlatformString @"iOS"
#define kATConnectPlatformString @"iOS"
#elif TARGET_OS_MAC
# define kATConnectPlatformString @"Mac OS X"
#define kATConnectPlatformString @"Mac OS X"
@class ATFeedbackWindowController;
#endif

Expand All @@ -45,7 +45,7 @@ extern NSString *const ATSurveySentNotification;
extern NSString *const ATSurveyIDKey;

/** Supported Push Providers for use in `setPushNotificationIntegration:withDeviceToken:` */
typedef NS_ENUM(NSInteger, ATPushProvider){
typedef NS_ENUM(NSInteger, ATPushProvider) {
/** Specifies the Apptentive push provider. */
ATPushProviderApptentive,
/** Specifies the Urban Airship push provider. */
Expand Down Expand Up @@ -114,28 +114,28 @@ Before calling any other methods on the shared `ATConnect` instance, set the API
This key is found on the Apptentive website under Settings, API & Development.
*/
@property (nonatomic, copy) NSString *_Nullable apiKey;
@property (copy, nonatomic) NSString *_Nullable apiKey;

/**
The app's iTunes App ID.
You can find this in iTunes Connect, and is the numeric "Apple ID" shown on your app details page.
*/
@property (nonatomic, copy) NSString *_Nullable appID;
@property (copy, nonatomic) NSString *_Nullable appID;

/** The shared singleton of `ATConnect`. */
+ (ATConnect *)sharedConnection;

/** An object conforming to the `ATConnectDelegate` protocol */
@property (nonatomic, weak) id<ATConnectDelegate> delegate;
@property (weak, nonatomic) id<ATConnectDelegate> delegate;

///---------------------------------
/// @name Interface Customization
///---------------------------------
/** Toggles the display of an email field in the message panel. `YES` by default. */
@property (nonatomic, assign) BOOL showEmailField;
@property (assign, nonatomic) BOOL showEmailField;
/** Set this if you want some custom text to appear as a placeholder in the feedback text box. */
@property (nonatomic, copy) NSString *customPlaceholderText;
@property (copy, nonatomic) NSString *customPlaceholderText;
#if TARGET_OS_IPHONE
/**
A tint color to use in Apptentive-specific UI.
Expand All @@ -145,7 +145,7 @@ Before calling any other methods on the shared `ATConnect` instance, set the API
@deprecated Use `[UIAppearance appearanceWhenContainedIn:[ATNavigationController class], nil].tintColor`
*/
@property (nonatomic, strong) UIColor *tintColor DEPRECATED_ATTRIBUTE;
@property (strong, nonatomic) UIColor *tintColor DEPRECATED_ATTRIBUTE;
#endif

#if TARGET_OS_IPHONE
Expand Down

0 comments on commit d9a000d

Please sign in to comment.