mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
add fix suggestion to qhelp of js/use-of-returnless-function
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
<p>
|
||||
JavaScript functions that do not return any value will implicitly return
|
||||
<code>undefined</code>. Using the implicit return value from such a function
|
||||
is not an error in itself, but it is a pattern indicating that some
|
||||
misunderstanding has occurred.
|
||||
is not an error in itself, but it is a pattern indicating that some
|
||||
misunderstanding has occurred.
|
||||
</p>
|
||||
|
||||
</overview>
|
||||
@@ -31,6 +31,12 @@ an error.
|
||||
|
||||
<sample src="examples/UseOfReturnlessFunction.js" />
|
||||
|
||||
<p>
|
||||
The program can be fixed either removing the use of the value returned by
|
||||
<code>renderText</code>, or by changing the <code>renderText</code> method
|
||||
to return a value.
|
||||
</p>
|
||||
|
||||
</example>
|
||||
<references>
|
||||
<li>Mozilla Developer Network: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return">Return</a>.</li>
|
||||
|
||||
Reference in New Issue
Block a user