Skip to content

Commit

Permalink
Merge pull request braintree#84 from braintree/feature/new-line-at-en…
Browse files Browse the repository at this point in the history
…d-of-file

Add a new-line at the end of every file to support merchant integrations with GCC_WARN_ABOUT_MISSING_NEWLINE
  • Loading branch information
mickeyreiss committed Nov 27, 2014
2 parents 012f0a5 + 1ee5cce commit 0ab1fea
Show file tree
Hide file tree
Showing 76 changed files with 77 additions and 75 deletions.
2 changes: 1 addition & 1 deletion Braintree.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
s.source_files = "Braintree/*.{m,h}"

s.compiler_flags = "-Wall -Werror -Wextra"
s.xcconfig = { "GCC_TREAT_WARNINGS_AS_ERRORS" => "YES" }
s.xcconfig = { "GCC_TREAT_WARNINGS_AS_ERRORS" => "YES", "GCC_WARN_ABOUT_MISSING_NEWLINE" => "YES" }

s.default_subspecs = %w[Drop-In API PayPal Venmo UI Payments]

Expand Down
2 changes: 2 additions & 0 deletions Braintree.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4290,6 +4290,7 @@
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(TARGET_TYPE)/$(PRODUCT_NAME)/Supporting Files/$(PRODUCT_NAME)-Prefix.pch";
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
INFOPLIST_FILE = "$(TARGET_TYPE)/$(PRODUCT_NAME)/Supporting Files/$(PRODUCT_NAME)-Info.plist";
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
Expand All @@ -4304,6 +4305,7 @@
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(TARGET_TYPE)/$(PRODUCT_NAME)/Supporting Files/$(PRODUCT_NAME)-Prefix.pch";
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
INFOPLIST_FILE = "$(TARGET_TYPE)/$(PRODUCT_NAME)/Supporting Files/$(PRODUCT_NAME)-Info.plist";
OTHER_CFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion Braintree/API/@Public/BTClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ typedef void (^BTClientFailureBlock)(NSError *error);
success:(BTClientCardSuccessBlock)successBlock
failure:(BTClientFailureBlock)failureBlock DEPRECATED_MSG_ATTRIBUTE("Please use BTClientCardRequest and saveCardWithRequest:validate:success:failure:");

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/@Public/BTClientCardTokenizationRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
/// @return The card request as a dictionary for uploading as parameters in API requests.
- (NSDictionary *)parameters;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/App Switch/BTAppSwitchErrors.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#import "BTAppSwitchErrors.h"

NSString *const BTAppSwitchErrorDomain = @"BTAppSwitchErrorDomain";
NSString *const BTAppSwitchErrorDomain = @"BTAppSwitchErrorDomain";
2 changes: 1 addition & 1 deletion Braintree/API/Client/API Resources/BTAPIResourceErrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ typedef NS_ENUM(NSInteger, BTAPIResourceErrorCode) {
BTAPIResourceErrorAPIDictionaryInvalid,
/// The API Dictionary contains an invalid nested resource
BTAPIResourceErrorAPIDictionaryNestedResourceInvalid,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ + (NSDictionary *)APIFormat {
};
}

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Client/BTClientMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ typedef NS_ENUM(NSInteger, BTClientMetadataIntegrationType) {
- (void)setIntegration:(BTClientMetadataIntegrationType)integration;
- (void)setSource:(BTClientMetadataSourceType)source;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Client/BTClientMetadata.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ - (void)setSource:(BTClientMetadataSourceType)source {
_source = source;
}

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Client/BTClientToken.m
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,4 @@ - (NSString *)btVenmo_status {
}
}

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Models/BTClientCardTokenizationRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ - (void)safeSetObject:(id)object toDictionary:(NSMutableDictionary *)dictionary
}


@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Models/BTMutableCardPaymentMethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

/// Mutable version of BTCardPaymentMethod.
@interface BTMutableCardPaymentMethod : BTCardPaymentMethod
@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Models/BTMutablePayPalPaymentMethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

/// Mutable version of BTPayPalPaymentMethod.
@interface BTMutablePayPalPaymentMethod : BTPayPalPaymentMethod
@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Models/BTPaymentMethod.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ - (NSString *)debugDescription {
return [NSString stringWithFormat:@"<%@:%p \"%@\" nonce:%@>", NSStringFromClass([self class]), self, [self description], self.nonce];
}

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Models/BTPaymentMethod_Mutable.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
@property (nonatomic, readwrite, strong) NSSet *challengeQuestions;
@property (nonatomic, readwrite, copy) NSString *description;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Networking/BTHTTPResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

- (instancetype)initWithStatusCode:(NSInteger)statusCode responseObject:(NSDictionary *)response;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Offline Mode/BTOfflineModeURLProtocol.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,4 @@ + (void)setBackend:(BTOfflineClientBackend *)backend {
objc_setAssociatedObject(self, backend_associated_object_key, backend, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

@end
@end
2 changes: 1 addition & 1 deletion Braintree/API/Utility/BTKeychain.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
+ (NSData *)dataForKey:(NSString *)key;


@end
@end
2 changes: 1 addition & 1 deletion Braintree/Data/DeviceCollectorSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@
* @result void
*/
- (void) setDelegate:(id<DeviceCollectorSDKDelegate>) delegate;
@end // end @interface DeviceCollectorSDK
@end // end @interface DeviceCollectorSDK
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

- (void)selectPaymentMethodViewControllerDidRequestNew:(BTDropInSelectPaymentMethodViewController *)viewController;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/Drop-In/BTDropInViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@
/// @param viewController The Drop In view controller informing its delegate
- (void)dropInViewControllerWillComplete:(BTDropInViewController *)viewController;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/Drop-In/Localization/BTDropInLocalizedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
+ (NSString *)ERROR_SAVING_PAYPAL_ACCOUNT_ALERT_MESSAGE;
+ (NSString *)ADD_PAYMENT_METHOD_VIEW_CONTROLLER_TITLE;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/PayPal/BTPayPalAppSwitchHandler_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

@property (nonatomic, strong, readwrite) BTClient *client;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/Payments/@Public/BTPaymentProviderErrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ NS_ENUM(NSInteger, BTPaymentProviderErrorCode) {

/// An error occured creating a Braintree Payment Method from the Apple Pay token
BTPaymentProviderErrorPaymentMethodCreation,
};
};
2 changes: 1 addition & 1 deletion Braintree/Payments/@Public/Braintree-Payments.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/// All-in-one import for the Braintree iOS SDK

#import "BTPaymentProvider.h"
#import "BTPaymentProvider.h"
2 changes: 1 addition & 1 deletion Braintree/Payments/BTPaymentApplePayProvider_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
+ (BOOL)isSimulator;
- (BOOL)paymentAuthorizationViewControllerCanMakePayments;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/Payments/BTPaymentProviderErrors.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#import "BTPaymentProviderErrors.h"

NSString *const BTPaymentProviderErrorDomain = @"BTPaymentProviderErrorDomain";
NSString *const BTPaymentProviderErrorDomain = @"BTPaymentProviderErrorDomain";
2 changes: 1 addition & 1 deletion Braintree/UI/Models/BTUICardExpiryFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

- (void)formattedValue:(NSString * __autoreleasing *)value cursorLocation:(NSUInteger *)cursorLocation;

@end
@end
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

- (void)mockApplePayPaymentAuthorizationViewControllerDidFinish:(BTMockApplePayPaymentAuthorizationViewController *)viewController;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/UI/Views/Custom Views/BTUIFormField.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
- (void)formFieldDidChange:(BTUIFormField *)formField;
- (void)formFieldDidDeleteWhileEmpty:(BTUIFormField *)formField;

@end
@end
2 changes: 1 addition & 1 deletion Braintree/UI/Views/Custom Views/BTUITextField.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
- (void)textField:(BTUITextField *)textField willInsertText:(NSString *)text;
- (void)textField:(BTUITextField *)textField didInsertText:(NSString *)text;

@end
@end
2 changes: 1 addition & 1 deletion Demos/Braintree-API-Demo/BraintreeDemoClientOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ typedef void (^BraintreeDemoClientOperationDidCompleteBlock)(id, NSError *);

- (void)performWithCompletionBlock:(BraintreeDemoClientOperationDidCompleteBlock)operationDidComplete;

@end
@end
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

@interface BraintreeDemoBraintreeInitializationDemoViewController : UIViewController
- (instancetype)initWithCompletion:(void (^)(Braintree *braintree, NSString *currentMerchantName, NSError *error))completionBlock;
@end
@end
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ - (NSString *)tableView:(__unused UITableView *)tableView titleForHeaderInSectio
return @"Custom Card Form";
}

@end
@end
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#import <Availability.h>
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import <UIKit/UIKit.h>

@interface BraintreeDemoPaymentsUIComponentsViewController : UIViewController
@end
@end
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
AFNetworking: 6d7b76aa5d04c8c37daad3eef4b7e3f2a7620da3
Braintree: 0f16114efdcd589aa7901b04f9a9571187623607
Braintree: fced670cebb1a2deba07461edde061e7227ef0bf
Expecta: 03aabd0a89d8dea843baecb19a7fd7466a69a31d
FLEX: 8e53751b915759215d77c7c72b1c7bd28665dac2
HockeySDK: 27d8b411208f9d3f70c8f6695a8defa2a3465721
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
#import <OCMock/OCMock.h>

#define HC_SHORTHAND
#import <OCHamcrest/OCHamcrest.h>
#import <OCHamcrest/OCHamcrest.h>
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTAPIResourceSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,4 @@ + (NSDictionary *)sampleValidAPIDictionaryForTest {

pending(@"API Request object generation");

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTAPIResourceValueTypesSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ - (void)setBool:(__unused BOOL)value {
});
});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTApplePayPaymentMethodSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@
});
});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTCardSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
});
});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTClientMetadataSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@
});
});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTClientStoreSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ + (NSData *)dataForKey:(NSString *)key {

});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTClientTokenSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,4 @@

});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTHTTPResponseSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
expect(response.object).to.equal(@{@"errors": @"Some server error"});
});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTLoggerSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@

});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTMutableCardSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@
});
});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTOfflineModeURLProtocolSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
});
});

SpecEnd
SpecEnd
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTTestClientTokenFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ + (NSString *)tokenWithVersion:(NSInteger)version
}
}

@end
@end
2 changes: 1 addition & 1 deletion Specs/Braintree-API-Specs/BTURLUtilsSpecs.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
});
});

SpecEnd
SpecEnd
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

#import <OHHTTPStubs/OHHTTPStubs.h>

#import "BTSpecHelper.h"
#import "BTSpecHelper.h"
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
#define EXP_SHORTHAND
#import <Expecta/Expecta.h>

#import <OCMock/OCMock.h>
#import <OCMock/OCMock.h>
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@
});
});

SpecEnd
SpecEnd
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
#define HC_SHORTHAND
#import <OCHamcrest/OCHamcrest.h>

#import <OHHTTPStubs/OHHTTPStubs.h>
#import <OHHTTPStubs/OHHTTPStubs.h>
Loading

0 comments on commit 0ab1fea

Please sign in to comment.