mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
JS: Update OK-style comments to $-style
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
function foo() {
|
||||
var f;
|
||||
eval("f = alert");
|
||||
f("Hi"); // OK: initialised by eval
|
||||
f("Hi"); // OK - initialised by eval
|
||||
}
|
||||
|
||||
function bar() {
|
||||
var g;
|
||||
g(); // NOT OK, but not currently flagged
|
||||
g(); // $ MISSED: Alert
|
||||
eval("g = alert");
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ function baz() {
|
||||
function inner(b) {
|
||||
if (b) {
|
||||
inner(false);
|
||||
g(); // OK: initialised by eval below
|
||||
g(); // OK - initialised by eval below
|
||||
} else {
|
||||
eval("g = alert");
|
||||
}
|
||||
}
|
||||
inner(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,20 +5,20 @@ namespace f {
|
||||
export function inner() {}
|
||||
}
|
||||
|
||||
f(); // OK
|
||||
f.inner(); // OK
|
||||
f();
|
||||
f.inner();
|
||||
|
||||
class C {}
|
||||
namespace C {
|
||||
export function inner() {}
|
||||
}
|
||||
|
||||
new C(); // OK
|
||||
C.inner(); // OK
|
||||
new C();
|
||||
C.inner();
|
||||
|
||||
namespace g {
|
||||
export function inner() {}
|
||||
}
|
||||
|
||||
g(); // NOT OK
|
||||
g.inner(); // OK
|
||||
g(); // $ Alert
|
||||
g.inner();
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
class A extends null {
|
||||
constructor() {
|
||||
// OK: calls `Function.prototype`
|
||||
// OK - calls `Function.prototype`
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends 42 {
|
||||
constructor() {
|
||||
// NOT OK
|
||||
super();
|
||||
super(); // $ Alert
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user