Permalink
Browse files

Implemented optional disabling for missing method arguments warnings.

  • Loading branch information...
1 parent a422865 commit 3a8da42e4d61d40e9a03ec3dbb0b1158b036f2ed @tomaz committed Dec 28, 2010
@@ -246,6 +246,9 @@
/** Indicates whether invalid cross reference should result in warning or not. */
@property (assign) BOOL warnOnInvalidCrossReference;
+/** Indicates whether missing method argument descriptions in comments should result in warnings or not. */
+@property (assign) BOOL warnOnMissingMethodArgument;
+
///---------------------------------------------------------------------------------------
/// @name Application-wide HTML helpers
///---------------------------------------------------------------------------------------
@@ -66,6 +66,7 @@ - (id)init {
self.warnOnUndocumentedObject = YES;
self.warnOnUndocumentedMember = YES;
self.warnOnInvalidCrossReference = YES;
+ self.warnOnMissingMethodArgument = YES;
self.docsetBundleIdentifier = @"$COMPANYID.$PROJECT";
self.docsetBundleName = @"$PROJECT Documentation";
@@ -308,6 +309,7 @@ - (NSString *)description {
@synthesize warnOnUndocumentedObject;
@synthesize warnOnUndocumentedMember;
@synthesize warnOnInvalidCrossReference;
+@synthesize warnOnMissingMethodArgument;
@synthesize commentComponents;
@synthesize stringTemplates;
@@ -182,7 +182,7 @@ - (void)processParametersFromComment:(GBComment *)comment matchingMethod:(GBMeth
[description appendString:parameter.argumentName];
[sorted addObject:parameter];
}];
- GBLogWarn(@"%@: %ld unknown parameter descriptions (%@) found for %@", comment.sourceInfo, [parameters count], description, method);
+ if (self.settings.warnOnMissingMethodArgument) GBLogWarn(@"%@: %ld unknown parameter descriptions (%@) found for %@", comment.sourceInfo, [parameters count], description, method);
}
// Finaly re-register parameters to the comment if necessary (no need if there's only one parameter).

0 comments on commit 3a8da42

Please sign in to comment.