-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalize description in annotations #81
Comments
The hyphen really helps to make things clearer when it comes to So hyphen mandatory for |
I am worried about having different approaches for the same feature (specifying a description). All three annotations, and all incoming annotations allowing a description should probably behave the same. I think having the hyphen not only helps making things easier to read as Pascal said, but also clearly defines where the description starts. For now, everything that comes before a description is very explicit: either a name (single word, no space) or a type (braces). But some day, we might have a parameter accepting spaces right before a description. Then we'll be forced to have an hyphen. So should we make it mandatory right now just to be future proof? Now regarding I don't know. |
/**
* @returns {Map} - A map containing some keys and values, yes crazy.
*/ Well it's okay, looks a bit redundant but we can live with this I guess. |
I don't remember to ever seen this hyphen thing in other documentation formats... while I don't dislike it, I don't think it should be mandatory. So I'd go for optional hyphen everywhere. |
Consider: /**
* @annotation parameter description
*/ Now what if |
Parameter cannot contain spaces. |
Why? |
I don't see any kind of annotation for software documentation where it would be necessary to have spaces in the parameter before the description. It's usualy a function or variable identifier which can't contain spaces. If it's really necessary, the hyphen is required to distinguish the parameter from the description (but what if the parameter can contain hyphens?), that's why I propose to make it optional. |
Fair point. Let's go with optional everywhere. |
I would say that this should be dynamic enough http://www.regexr.com/394l2 |
Okay. |
* When it's a string, we use it as parent, stripping eventual glob patterns. * When it's an array, or we don't have any `src` because of streaming, we don't check anything. --- * Related: #81
@returns
:@param
:Incoming
@requires
:First, the hyphen:
Second, we make all those annotations behave the same by following the same rule. Curently, hyphen doesn't exist in
@returns
, is mandatory on@param
and is about to be added as optional to@requires
. Nope.So, how do we do?
Edit: I'm tagging this for v1. It's not much, but we need to settle things down now.
The text was updated successfully, but these errors were encountered: