29#if OO_OXP_VERIFIER_ENABLED
33static NSString *
const kStageName =
@"Checking plist well-formedness";
55 fileScanner = [[
self verifier] fileScannerStage];
57 NSArray *plists = [[[
self verifier] configurationDictionaryForKey:@"knownFiles"] oo_arrayForKey:@"Config"];
58 NSArray *arrayPlists = [[[
self verifier] configurationDictionaryForKey:@"knownFiles"] oo_arrayForKey:@"ConfigArrays"];
59 NSArray *dictionaryPlists = [[[
self verifier] configurationDictionaryForKey:@"knownFiles"] oo_arrayForKey:@"ConfigDictionaries"];
61 NSString *plistName =
nil;
62 foreach (plistName, plists)
64 if ([fileScanner fileExists:plistName
69 OOLog(
@"verifyOXP.syntaxCheck",
@"Checking %@",plistName);
70 id retrieve = [fileScanner
plistNamed:plistName
76 if ([retrieve isKindOfClass:[NSArray
class]])
78 if (![arrayPlists containsObject:plistName])
80 OOLog(
@"verifyOXP.syntaxCheck.error",
@"%@ should be an array but isn't.",plistName);
83 else if ([retrieve isKindOfClass:[NSDictionary
class]])
85 if (![dictionaryPlists containsObject:plistName])
87 OOLog(
@"verifyOXP.syntaxCheck.error",
@"%@ should be an array but isn't.",plistName);
92 OOLog(
@"verifyOXP.syntaxCheck.error",
@"%@ is neither an array nor a dictionary.",plistName);
static NSString *const kStageName
static NSString *const kStageName
#define OOLog(class, format,...)
id plistNamed:inFolder:referencedFrom:checkBuiltIn:(NSString *file,[inFolder] NSString *folder,[referencedFrom] NSString *context,[checkBuiltIn] BOOL checkBuiltIn)