Fixed: notification xib converted wasn't displayed anymore

Previously, the notification xib converted didn't show up. Now it does again.

This PR fixes another issue. Now when checking the the compilation issues, we only pass objj file to the command objj.
This commit is contained in:
Alexandre Wilhelm
2014-11-06 09:38:30 -08:00
parent 6d956c6138
commit ea0c5e291f
2 changed files with 23 additions and 12 deletions
@@ -158,20 +158,16 @@
}
else if (!self.xcc.isLoadingProject)
{
BOOL showFinalNotification = NO;
BOOL showFinalNotification = YES;
// At this point, we should only detect warnings
if ([self.xcc shouldProcessWithObjjWarnings])
if ([self.xcc shouldProcessWithObjjWarnings] && ![self.xcc isXibFile:self.sourcePath])
{
showFinalNotification = [self.xcc checkObjjWarningsForPath:[NSArray arrayWithObject:self.sourcePath]];
[self.xcc showObjjWarnings];
}
else
{
showFinalNotification = YES;
}
if ([self.xcc shouldProcessWithCappLint])
if ([self.xcc shouldProcessWithCappLint] && ![self.xcc isXibFile:self.sourcePath])
{
showFinalNotification = [self.xcc checkCappLintForPath:[NSArray arrayWithObject:self.sourcePath]] && showFinalNotification;
[self.xcc showCappLintWarnings];
+20 -5
View File
@@ -1852,15 +1852,26 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
DDLogVerbose(@"Checking path %@ with objj", paths);
NSUInteger numberOfFiles = [paths count];
NSUInteger i = 0;
NSMutableArray *objjPaths = [NSMutableArray array];
if (!numberOfFiles)
// We only want the objj files
for (i = 0; i < numberOfFiles; i++)
{
NSString *path = [paths objectAtIndex:i];
if ([self isObjjFile:path])
[objjPaths addObject:path];
}
if (![objjPaths count])
return YES;
[[NSNotificationCenter defaultCenter] postNotificationName:XCCBatchDidStartNotification object:self];
[[NSNotificationCenter defaultCenter] postNotificationName:XCCObjjDidStartNotification object:self];
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"-I", [self _getObjjIncludePaths], @"-m", nil];
[arguments addObjectsFromArray:paths];
[arguments addObjectsFromArray:objjPaths];
NSDictionary *taskResult = [self runTaskWithLaunchPath:self.executablePaths[@"objj"]
arguments:arguments
@@ -1879,7 +1890,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
NSMutableArray *errors = [NSMutableArray arrayWithArray:[response componentsSeparatedByString:@"\n\n"]];
NSInteger numberOfErrors = [errors count];
NSInteger i = 0;
i = 0;
NSMutableArray *dicts = [NSMutableArray array];
// When checking of the entire project, we have to be ready to find errors
@@ -1906,8 +1917,12 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
if (![matches count])
{
DDLogVerbose(@"Error %@ has been ignored by xCodeCapp, the error doesn't respect any pattern", error);
continue;
// This shouldn't happen
DDLogVerbose(@"Error %@ doesn't respect any pattern", error);
path = @"";
line = 0;
messageError = [NSString stringWithFormat:@"Compiling issue at line %@ of file %@:\n%@", line, path.lastPathComponent, error];
}
for (NSTextCheckingResult *match in matches)