Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Correct handling of warnOnMissingMethodArgument to suppress missing, rather then unknown warning. #404

Merged
merged 1 commit into from

2 participants

@chuckhoupt

Hi appledoc-ers,

I noticed that --no-warn-missing-arg wasn't suppressing the warnings for missing parameter descriptions. It looks like the flag was applied to the unknown-parameter warnings by mistake. Here's a patch to fix it.

Cheers - Chuck

@tomaz tomaz merged commit 2e6c541 into tomaz:master
@tomaz
Owner

Just merged in, thanks!

@chuckhoupt chuckhoupt deleted the chuckhoupt:argwarn-fix branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 29, 2013
  1. @chuckhoupt

    Correct handling of warnOnMissingMethodArgument to suppress missing, …

    chuckhoupt authored
    …rather then unknown warning.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 Processing/GBProcessor.m
View
4 Processing/GBProcessor.m
@@ -226,7 +226,7 @@ - (void)processParametersFromComment:(GBComment *)comment matchingMethod:(GBMeth
[names enumerateObjectsUsingBlock:^(NSString *name, NSUInteger idx, BOOL *stop) {
GBCommentArgument *parameter = [parameters objectForKey:name];
if (!parameter) {
- if (method.includeInOutput)
+ if (self.settings.warnOnMissingMethodArgument && method.includeInOutput)
GBLogXWarn(comment.sourceInfo, @"%@: Description for parameter '%@' missing for %@!", comment.sourceInfo, name, method);
return;
}
@@ -240,7 +240,7 @@ - (void)processParametersFromComment:(GBComment *)comment matchingMethod:(GBMeth
[description appendString:parameter.argumentName];
[sorted addObject:parameter];
}];
- if (self.settings.warnOnMissingMethodArgument && method.includeInOutput) GBLogXWarn(comment.sourceInfo, @"%@: %ld unknown parameter descriptions (%@) found for %@", comment.sourceInfo, [parameters count], description, method);
+ if (method.includeInOutput) GBLogXWarn(comment.sourceInfo, @"%@: %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).
Something went wrong with that request. Please try again.