Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1305)

Unified Diff: Source/devtools/scripts/jsdoc-validator/tests/golden.dat

Issue 199733011: DevTools: [JsDocValidator] Avoid false-positive function receiver-related errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/scripts/jsdoc-validator/tests/golden.dat
diff --git a/Source/devtools/scripts/jsdoc-validator/tests/golden.dat b/Source/devtools/scripts/jsdoc-validator/tests/golden.dat
index 3c88632421d578f7eab3ebbbe130ff8c2eb7503b..1f51a3f987b0c7dc482bc683e313f766bda9a542 100644
--- a/Source/devtools/scripts/jsdoc-validator/tests/golden.dat
+++ b/Source/devtools/scripts/jsdoc-validator/tests/golden.dat
@@ -198,76 +198,84 @@ function badFuncAnnotatedButNoReturnValue() // ERROR - no returned value.
var badMemberBinding2 = this.memberTwo.bind(bar); // ERROR - Member not bound to |this| receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:217: ERROR - Receiver not specified for a function annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:217: ERROR - Receiver not specified for a function referencing 'this'
callbackWithThis(); // ERROR - No receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:218: ERROR - Receiver not specified for a function annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:218: ERROR - Receiver not specified for a function referencing 'this'
callbackWithThis.call(); // ERROR - No receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:219: ERROR - Receiver not specified for a function annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:219: ERROR - Receiver not specified for a function referencing 'this'
callbackWithThis.call(null); // ERROR - No receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:220: ERROR - Receiver not specified for a function annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:220: ERROR - Receiver not specified for a function referencing 'this'
callbackWithThis.apply(); // ERROR - No receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:221: ERROR - Receiver not specified for a function annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:221: ERROR - Receiver not specified for a function referencing 'this'
callbackWithThis.apply(null); // ERROR - No receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:222: ERROR - Receiver specified for a function not annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:222: ERROR - Receiver specified for a function not referencing 'this'
callbackNoThis.call(this); // ERROR - Function has no @this annotation.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:223: ERROR - Receiver specified for a function not annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:223: ERROR - Receiver specified for a function not referencing 'this'
callbackNoThis.call(foo); // ERROR - Function has no @this annotation.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:224: ERROR - Receiver specified for a function not annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:224: ERROR - Receiver specified for a function not referencing 'this'
callbackNoThis.apply(this); // ERROR - Function has no @this annotation.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:225: ERROR - Receiver specified for a function not annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:225: ERROR - Receiver specified for a function not referencing 'this'
callbackNoThis.bind(this); // ERROR - Function has no @this annotation.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:227: ERROR - Function annotated with @this used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:227: ERROR - Function referencing 'this' used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
this.memberTwo(callbackWithThis); // ERROR - Used as argument with no bound receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:228: ERROR - Receiver not specified for a function annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:228: ERROR - Receiver not specified for a function referencing 'this'
this.memberTwo(callbackWithThis.bind(null, 2)); // ERROR - Used as argument with no bound receiver (null means "no receiver").
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:229: ERROR - Receiver specified for a function not annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:229: ERROR - Receiver specified for a function not referencing 'this'
this.memberTwo(callbackNoThis.bind(this)); // ERROR - Bound to a receiver but has no @this annotation.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:230: ERROR - Receiver specified for a function not annotated with @this
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:230: ERROR - Receiver specified for a function not referencing 'this'
this.memberTwo(callbackNoThis.bind(foo)); // ERROR - Bound to a receiver but has no @this annotation.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:237: ERROR - Function annotated with @this used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:237: ERROR - Function referencing 'this' used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
array.forEach(callbackWithThis); // ERROR - No receiver.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:238: ERROR - Function not annotated with @this used as argument with a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:238: ERROR - Function not referencing 'this' used as argument with a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
array.forEach(callbackNoThis, this); // ERROR - Receiver for callback with no @this annotation.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:247: ERROR - Function not annotated with @this used as argument with a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:247: ERROR - Function not referencing 'this' used as argument with a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
element.addEventListener("click", callbackNoThis, this); // ERROR.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:253: ERROR - Function annotated with @this used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:253: ERROR - Function referencing 'this' used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
element.addEventListener("click", callbackWithThis, true); // ERROR.
^
-/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:254: ERROR - Function annotated with @this used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:254: ERROR - Function referencing 'this' used as argument without a receiver. This check can be suppressed using @suppressReceiverCheck annotation on function declaration.
element.addEventListener("click", callbackWithThis, false); // ERROR.
^
-Total errors: 68
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:268: ERROR - @this annotation is required for functions referencing 'this'
+ function callbackReferencingThisNotAnnotated()
+ ^
+
+/usr/local/google/home/apavlov/dev/blink/src/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js:277: ERROR - @this annotation found for function not referencing 'this'
+ function callbackNotReferencingThisAnnotated()
+ ^
+
+Total errors: 70

Powered by Google App Engine
This is Rietveld 408576698