Skip to content

Commit f368379

Browse files
committed
stylistic changes per PR change req. in description
#1078 (review)
1 parent f9012cb commit f368379

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

javascript/ql/src/semmle/javascript/Functions.qll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,12 @@ class Function extends @function, Parameterized, TypeParameterized, StmtContaine
159159
}
160160

161161
/**
162-
* Gets a return from a function which has undefined value (i.e. implicit returns
163-
* and returns w/o expressions).
164-
*/
165-
166-
/* Functions can have undefined returns in a few different ways:
162+
* Gets a return from a function which has undefined value (that is, implicit
163+
* returns and returns without expressions).
164+
*
165+
* Functions can have undefined returns in a few different ways:
167166
*
168-
* 1. An explicit return statement with no expression, i.e. the statement `return;`
167+
* 1. An explicit return statement with no expression (the statement `return;`)
169168
*
170169
* 2. An implicit return resulting from an expression executing as the last thing
171170
* in the function. For example, the test in a final `if` statement:

javascript/ql/test/library-tests/Functions/undefinedreturns.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
//////////////////
66
// //
7-
// GOOD CASES //
7+
// DON'T FIND //
88
// //
99
//////////////////
1010

@@ -18,11 +18,11 @@ function fn_w_final_return_w_expr() { return 1; }
1818

1919

2020

21-
/////////////////
22-
// //
23-
// BAD CASES //
24-
// //
25-
/////////////////
21+
////////////
22+
// //
23+
// FIND //
24+
// //
25+
////////////
2626

2727
function fn_w_empty_body() { }
2828
function fn_w_final_return_wo_expr() { return; }

0 commit comments

Comments
 (0)