Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Invalid JsDoc - @public
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Steven Hall  
View profile  
 More options Sep 2 2010, 8:36 am
From: Steven Hall <stvh...@gmail.com>
Date: Thu, 2 Sep 2010 05:36:10 -0700 (PDT)
Local: Thurs, Sep 2 2010 8:36 am
Subject: Invalid JsDoc - @public
After getting back some errors telling me that @public was not a valid
JsDoc annotation, I did some investigating into the causes.

I found that the STANDARD_DOC set in statetracker.py seemed to only
contain the JsDoc annotations defined in the Google Style Guide.

This is fine and I'd imagine it to be so, as this is a Closure tool.
However, it's clearly stated in the style guide that
    "We [Google] use JSDoc comments to document files, classes,
methods and properties."

It's a bit misleading that, despite Google supporting JsDoc, they only
use a subset of the tags. Similarly, the @protected tag doesn't seem
to exist in the JsDoc documentation (found here
http://code.google.com/p/jsdoc-toolkit/wiki/TagReference).

Could we receive some clarification on whether Google uses full JsDoc
documentation, or a subset of it? And if full JsDoc is supported,
would it be possible to issue a fix so that the Linter reflects this?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven Hall  
View profile  
 More options Sep 2 2010, 8:54 am
From: Steven Hall <stvh...@gmail.com>
Date: Thu, 2 Sep 2010 05:54:01 -0700 (PDT)
Local: Thurs, Sep 2 2010 8:54 am
Subject: Re: Invalid JsDoc - @public
Just thought I'd expand on this as it is a bit misleading and my
initial post was probably a bit abrupt.

@public and tags such as this are defined as being "discouraged" in
the Google style guide, which is fine.

I'm just having a bit of trouble making the distinction between
"discouraged" and actually breaking the style rules (as the Linter's
error logs would suggest). I understand that using @public would cause
an error in the Google Linter because you wouldn't expect to see
Google code with these tags in them.

However other applications may use these tags, which is fine (they're
JsDoc after all!), but the Linter would throw an error.

I think it might be a nice feature to include Google's set of approved
tags under the 'strict' flag, and let the full range of JsDoc tags be
allowed when strict is not set. This way those who use the Linter and
also use the full range of JsDoc annotations reap the benefits whereas
Google's internal code (which I am sure uses the strict flag)
maintains the restricted set of tags.

On Sep 2, 1:36 pm, Steven Hall <stvh...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy Perelson  
View profile  
 More options Sep 3 2010, 8:35 pm
From: Andy Perelson <a...@google.com>
Date: Sat, 4 Sep 2010 10:35:48 +1000
Local: Fri, Sep 3 2010 8:35 pm
Subject: Re: Invalid JsDoc - @public

The official policy for the Closure Linter is that we will allow only the
jsdoc tags that are in the Google JavaScript Style Guide. Internally if we
get a request for a new tag to be supported, we generally ask that it be
added to the style guide first. In practice, we will also allow any tag that
is explicitly supported by the Closure Compiler.

As for our use of JsDoc... we've certainly deviated from the JsDoc toolkit
and today don't by default support using all the tags of the JsDoc toolkit.
It's certainly at our discretion to not use certain tags if we don't want
to, and in the case of our style guide... discouraged is strong enough that
we don't allow discouraged tags by default (though there are
workarounds I'll talk about later). As for tags that we've added like
@protected, they are generally there to work in conjunction with our other
tools like the Closure Compiler which uses those annotations as part of its
own system of checks.

As for as putting all JsDoc toolkit tags in non-strict mode, I doubt we
would do that by default. The default mode of the Closure Linter is supposed
to enforce the Google style guide, which includes not using some of those
tags, and strict mode is actually meant to enforce the more stringent and
less openly defined Closure style.

That said there is already a solution to your problem. We have a
--custom_jsdoc_tags flag that takes a list of comma separated tags that
should be allowed. Using this flag you can add any flags you want, including
@public and other official JsDoc tags. It also might be a good idea to add a
flag or some other means of easily adding support (and in an ideal case even
good checking of) all the JsDoc toolkit tags in one go. Feel free to file a
feature request to track this issue if you'd like it.

Thank you,

Andy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven Hall  
View profile  
 More options Sep 6 2010, 3:58 am
From: Steven Hall <stvh...@gmail.com>
Date: Mon, 6 Sep 2010 00:58:26 -0700 (PDT)
Local: Mon, Sep 6 2010 3:58 am
Subject: Re: Invalid JsDoc - @public
That's the kind of flag I was looking for. Thanks.

On Sep 4, 1:35 am, Andy Perelson <a...@google.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »