RuleDescriptionExampleKPI
optin.osx.cocoa.localizability.EmptyLocalizationContextCheckeCheck that NSLocalizedString macros include a comment for context– (void)test { NSString *string = NSLocalizedString(@”LocalizedString”, nil); // warn NSString *string2 = NSLocalizedString(@”LocalizedString”, @” “); // warn NSString *string3 = NSLocalizedStringWithDefaultValue( @”LocalizedString”, nil, [[NSBundle allocMaintainability
osx.cocoa.LoopsImproved modeling of loops using Cocoa collection typesMaintainability
osx.cocoa.NonNilReturnValueModel the APIs that are guaranteed to return a non-nil valueMaintainability
osx.cocoa.NSAutoreleasePoolWarn for suboptimal uses of NSAutoreleasePool in Objective-C GC modevoid test() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [pool release]; // warn }Maintainability
osx.cocoa.UnusedIvarsWarn about private ivars that are never used@interface MyObj : NSObject { @private id x; // warn } @end @implementation MyObj @endMaintainability