-
-
Notifications
You must be signed in to change notification settings - Fork 168
Description
Motivation
Functions that never take parameters do not need examples. However, users may wish to include examples where necessary. An example that calls a function taking no arguments could only serve to explain the return value, which should be documented by @return.
Current behavior
Always requires an @example tag for all functions. The current behavior encourages examples that equate to quux(), which are by definition unnecessary.
Desired behavior
I would like an optional argument for require-example which exempts functions that take no arguments. I'm not exactly sure of the name for the option, but presumably something like exemptNoArguments. The default of this should be false so as to not break backwards compatibility.
Alternatives considered
For now, I've simply set require-example to warn instead of error.