SebastianGlonner / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
0 stars 0 forks source link

Inconsistent reporting of missing @this in JsDoc #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the linter on https://gist.github.com/2629373

What is the expected output?
No errors reported, because all of these methods are part of a prototype 
object, so it should be clear what 'this' will refer to.

What do you see instead?
The error MISSING_JSDOC_TAG_THIS is reported for the first two 'someMethod's 
but not for the third one.

What version of the product are you using?
2.3.5

I looked at the code a little bit, and I don't totally understand why this is 
happening, but I noticed that there appears to be an unused local variable, 
is_immediately_called: 
http://code.google.com/searchframe#JjZqJjI_BoQ/trunk/closure_linter/javascriptli
ntrules.py&l=289

Original issue reported on code.google.com by tbreisac...@chromium.org on 7 May 2012 at 6:38

GoogleCodeExporter commented 9 years ago
There were a couple of errors in the original gist. Here's the fixed version: 
https://gist.github.com/2629373/d98435d0f022d1e6fc14d5fd714f80afb819c3d3

We only get the error in the first case. Essentially, wrapping everything in a 
function seems to suppress the error, and I'm not sure why.

Original comment by tbreisac...@chromium.org on 7 May 2012 at 7:17