Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
add //!OCLintin those code line which need skip oclint
Browse files Browse the repository at this point in the history
  • Loading branch information
wrmswindmill committed Aug 2, 2019
1 parent 8fe222e commit 3316366
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 30 deletions.
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
Expand Up @@ -703,7 +703,7 @@ - (NSString *)_pareJSBundleType:(NSString*)instanceIdString jsBundleString:(NSSt
@try {
jsBundleString = [jsBundleString substringWithRange:NSMakeRange(validCharacter, MIN(100, length - validCharacter))];
}
@catch (NSException* e) {
@catch (NSException* e) {//!OCLint
}
if ([jsBundleString length] == 0) {
return bundleType;
Expand Down
Expand Up @@ -198,7 +198,7 @@ - (void)updateBindingData:(NSDictionary *)data
[self.weexInstance.componentManager updateAttributes:newAttributesOrStyles forComponent:self.ref];
} else if (i == WXDataBindingTypeEvents) {
[self _addEventParams:newAttributesOrStyles];
} else if (i == WXDataBindingTypeProp) {
} else if (i == WXDataBindingTypeProp) {//!OCLint
}
}
}
Expand Down
Expand Up @@ -287,7 +287,7 @@ - (WXJSToken *)scanPunctuator
// Check for most common single-character punctuators.
int ch = _source[_index];
std::string str = "";
switch (ch) {
switch (ch) {//!OCLint
// single-character punctuators
case 46: // .
case 40: // (
Expand Down Expand Up @@ -875,7 +875,7 @@ - (WXJSLiteral *)createLiteral:(WXJSToken *)token
node->value = token->value == "true";
return node;
} else {
assert(false);
assert(false);//!OCLint
}
}

Expand Down
Expand Up @@ -83,7 +83,7 @@ - (WXCellSlotComponent *)dequeueCellSlotWithType:(NSString *)type forIndexPath:(

- (WXCellSlotComponent *)templateWithType:(NSString *)type
{
return [_templateTypeMap objectForKey:type];;
return [_templateTypeMap objectForKey:type];
}

- (void)_registerCellClassForReuseID:(NSString *)templateID
Expand Down
Expand Up @@ -646,7 +646,7 @@ - (BOOL)requestGestureShouldStopPropagation:(UIGestureRecognizer *)gestureRecogn

-(void)setIndicatorView:(WXIndicatorView *)indicatorView
{
NSAssert(_recycleSliderView, @"");
NSAssert(_recycleSliderView, @"");//!OCLint
[_recycleSliderView setIndicator:indicatorView];
}

Expand Down
8 changes: 4 additions & 4 deletions ios/sdk/WeexSDK/Sources/Component/WXListComponent.mm
Expand Up @@ -972,7 +972,7 @@ - (void)_insertTableViewSectionAtIndex:(NSUInteger)section keepScrollPosition:(B
// catch system exception under 11.2 https://forums.developer.apple.com/thread/49676
@try {
[_tableView insertSections:[NSIndexSet indexSetWithIndex:section] withRowAnimation:animation];
} @catch(NSException *) {
} @catch(NSException *) {//!OCLint

}
} withKeepScrollPosition:keepScrollPosition adjustmentBlock:^CGFloat(NSIndexPath *top) {
Expand All @@ -990,7 +990,7 @@ - (void)_deleteTableViewSectionAtIndex:(NSUInteger)section keepScrollPosition:(B
// catch system exception under 11.2 https://forums.developer.apple.com/thread/49676
@try {
[_tableView deleteSections:[NSIndexSet indexSetWithIndex:section] withRowAnimation:animation];
} @catch(NSException *) {
} @catch(NSException *) {//!OCLint

}

Expand All @@ -1012,7 +1012,7 @@ - (void)_insertTableViewCellAtIndexPath:(NSIndexPath *)indexPath keepScrollPosit
// catch system exception under 11.2 https://forums.developer.apple.com/thread/49676
@try {
[_tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:animation];
} @catch(NSException *e) {
} @catch(NSException *e) {//!OCLint

}
}
Expand All @@ -1034,7 +1034,7 @@ - (void)_deleteTableViewCellAtIndexPath:(NSIndexPath *)indexPath keepScrollPosit
// catch system exception under 11.2 https://forums.developer.apple.com/thread/49676
@try {
[_tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:animation];
} @catch (NSException* e) {
} @catch (NSException* e) {//!OCLint

}
} withKeepScrollPosition:keepScrollPosition adjustmentBlock:^CGFloat(NSIndexPath *top) {
Expand Down
Expand Up @@ -93,8 +93,6 @@ @implementation WXSliderNeighborView
- (instancetype)init {

self = [super init];
if (!self) {
}
_decelerationRate = 0.01;
_scrollEnabled = YES;
_bounces = YES;
Expand Down Expand Up @@ -1621,7 +1619,7 @@ - (void)removeEvent:(NSString *)eventName

- (void)setIndicatorView:(WXIndicatorView *)indicatorView
{
NSAssert(_sliderView, @"");
NSAssert(_sliderView, @""); //!OCLint
[_sliderView setIndicator:indicatorView];
}

Expand Down
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
Expand Up @@ -81,7 +81,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
} else if (rate == 1.0) {
if (_playbackStateChanged)
_playbackStateChanged(WXPlaybackStatePlaying);
} else if (rate == -1.0) {
} else if (rate == -1.0) {//!OCLint
// Reverse playback
}
} else if ([keyPath isEqualToString:@"status"]) {
Expand Down Expand Up @@ -295,7 +295,7 @@ - (void)viewDidLoad
break;

default:
NSCAssert(NO, @"");
NSCAssert(NO, @"");//!OCLint
break;
}
[weakSelf fireEvent:eventType params:nil];
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
Expand Up @@ -34,7 +34,7 @@ @implementation WXWebView

- (void)dealloc
{
if (self) {
if (self) { //!OCLint
// self.delegate = nil;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m
Expand Up @@ -899,7 +899,7 @@ @implementation WXTouchGestureRecognizer

- (instancetype)initWithTarget:(id)target action:(SEL)action
{
return [self initWithComponent:nil];;
return [self initWithComponent:nil];
}

- (instancetype)initWithComponent:(WXComponent *)component
Expand Down
6 changes: 3 additions & 3 deletions ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
Expand Up @@ -730,9 +730,9 @@ - (void)_resetCSSNode:(NSArray *)styles
} else if ([value isEqualToString:@"center"]) {
return WeexCore::kAlignItemsCenter;
//return WXCoreFlexLayout::WXCore_AlignItems_Center;
} else if ([value isEqualToString:@"auto"]) {
} else if ([value isEqualToString:@"auto"]) {//!OCLint
// return YGAlignAuto;
} else if ([value isEqualToString:@"baseline"]) {
} else if ([value isEqualToString:@"baseline"]) {//!OCLint
// return YGAlignBaseline;
}
}
Expand All @@ -753,7 +753,7 @@ - (void)_resetCSSNode:(NSArray *)styles
return WeexCore::kAlignSelfCenter;
} else if ([value isEqualToString:@"auto"]) {
return WeexCore::kAlignSelfAuto;
} else if ([value isEqualToString:@"baseline"]) {
} else if ([value isEqualToString:@"baseline"]) {//!OCLint
// return YGAlignBaseline;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
Expand Up @@ -1100,7 +1100,7 @@ - (void)_syncUITasks
}
}

if (mismatchBeginIndex == _uiTaskQueue.count) {
if (mismatchBeginIndex == _uiTaskQueue.count) {//!OCLint
// here we get end tag or there are not begin and end directives
} else {
_syncUITaskCount ++;
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
Expand Up @@ -1055,7 +1055,7 @@ - (void)removeObservers
[self removeObserver:self forKeyPath:@"state" context:NULL];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@catch (NSException *exception) {
@catch (NSException *exception) {//!OCLint
}
}

Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
Expand Up @@ -80,7 +80,7 @@ @implementation WXModalUIModule

- (instancetype)init
{
if (self = [super init]) {
if (self = [super init]) {//!OCLint
}

return self;
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Module/WXStorageModule.m
Expand Up @@ -460,7 +460,7 @@ - (NSDictionary *)getInfoForKey:(NSString *)key {
}

- (void)setInfo:(NSDictionary *)info ForKey:(NSString *)key {
NSAssert(info, @"info must not be nil");
NSAssert(info, @"info must not be nil"); //!OCLint

// save info for key
NSMutableDictionary *newInfo = [NSMutableDictionary dictionaryWithDictionary:info];
Expand Down
1 change: 0 additions & 1 deletion ios/sdk/WeexSDK/Sources/Module/WXStreamModule.m
Expand Up @@ -290,7 +290,6 @@ + (NSString*)_getStatusText:(NSInteger)code
return @"ERR_INVALID_REQUEST";
case 100:
return @"Continue";
break;
case 101:
return @"Switching Protocol";
case 102:
Expand Down
3 changes: 0 additions & 3 deletions ios/sdk/WeexSDK/Sources/Utility/WXConvert.m
Expand Up @@ -134,9 +134,6 @@ + (CGFloat)safeAreaInset:(NSString*)value
WXPerformBlockSyncOnMainThread(^{
safeAreaInsets = topInstance.rootView.safeAreaInsets;
});

} else {
// Fallback on earlier versions
}
#endif
NSUInteger key = [directionArray indexOfObject:value];
Expand Down
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Utility/WXVersion.m
Expand Up @@ -20,8 +20,8 @@
#import "WXVersion.h"
#import "WXDefine.h"

static const char* WeexSDKBuildTime = "2019-08-01 12:40:11 UTC";
static const unsigned long WeexSDKBuildTimestamp = 1564663211;
static const char* WeexSDKBuildTime = "2019-08-02 09:30:20 UTC";
static const unsigned long WeexSDKBuildTimestamp = 1564738220;

NSString* GetWeexSDKVersion(void)
{
Expand Down

0 comments on commit 3316366

Please sign in to comment.