mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Update OK-style comments to $-style
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
const C = 45;
|
||||
|
||||
// NOT OK
|
||||
class C {}
|
||||
class C {} // $ Alert
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// OK: `const` is block scoped in ECMAScript 2015
|
||||
// OK - `const` is block scoped in ECMAScript 2015
|
||||
function f() {
|
||||
{
|
||||
const val = 1;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const C = 45;
|
||||
|
||||
// NOT OK
|
||||
function C() {}
|
||||
function C() {} // $ Alert
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// OK
|
||||
|
||||
const s = "there";
|
||||
@@ -1,23 +1,19 @@
|
||||
const x = 23, y = 42;
|
||||
|
||||
// NOT OK
|
||||
x = 42;
|
||||
x = 42; // $ Alert
|
||||
|
||||
// NOT OK
|
||||
y = 23;
|
||||
y = 23; // $ Alert
|
||||
|
||||
// NOT OK
|
||||
var y = -1;
|
||||
var y = -1; // $ Alert
|
||||
|
||||
// NOT OK
|
||||
++x;
|
||||
++x; // $ Alert
|
||||
|
||||
var z = 56;
|
||||
|
||||
// OK
|
||||
|
||||
z = 72;
|
||||
|
||||
// OK
|
||||
|
||||
const s = "hi";
|
||||
|
||||
(function (){
|
||||
|
||||
Reference in New Issue
Block a user