mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
JS: Update OK-style comments to $-style
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
(function(){
|
||||
var o = {};
|
||||
o.pure1 = 42; // NOT OK
|
||||
o.pure1 = 42; // $ Alert
|
||||
o.pure1 = 42;
|
||||
|
||||
o.pure2 = 42; // NOT OK
|
||||
o.pure2 = 42; // $ Alert
|
||||
o.pure2 = 43;
|
||||
|
||||
o.impure3 = 42;
|
||||
f();
|
||||
o.impure3 = 42;
|
||||
|
||||
o.pure4 = 42; // NOT OK
|
||||
o.pure4 = 42; // $ Alert
|
||||
43;
|
||||
o.pure4 = 42;
|
||||
|
||||
o.impure5 = 42;
|
||||
o.impure5 = f();
|
||||
|
||||
o.pure6 = f(); // NOT OK
|
||||
o.pure6 = f(); // $ Alert
|
||||
o.pure6 = 42;
|
||||
|
||||
o.pure7 = 42; // NOT OK
|
||||
o.pure7 = 42; // $ Alert
|
||||
if(x){}
|
||||
o.pure7 = 42;
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
o15.pure15_aliasWrite = 42;
|
||||
|
||||
var o16 = x? o: null;
|
||||
o.pure16_simpleAliasWrite = 42; // NOT OK
|
||||
o.pure16_simpleAliasWrite = 42; // $ Alert
|
||||
o16.pure16_simpleAliasWrite = 42;
|
||||
|
||||
var o17 = {
|
||||
@@ -82,31 +82,31 @@
|
||||
}
|
||||
|
||||
// DOM
|
||||
o.clientTop = 42; // OK
|
||||
o.clientTop = 42;
|
||||
o.clientTop = 42;
|
||||
|
||||
o.defaulted1 = null; // OK
|
||||
o.defaulted1 = null;
|
||||
o.defaulted1 = 42;
|
||||
|
||||
o.defaulted2 = -1; // OK
|
||||
o.defaulted2 = -1;
|
||||
o.defaulted2 = 42;
|
||||
|
||||
var o = {};
|
||||
o.pure18 = 42; // NOT OK
|
||||
o.pure18 = 42; // NOT OK
|
||||
o.pure18 = 42; // $ Alert
|
||||
o.pure18 = 42; // $ Alert
|
||||
o.pure18 = 42;
|
||||
|
||||
var o = {};
|
||||
Object.defineProperty(o, "setter", { // OK
|
||||
Object.defineProperty(o, "setter", {
|
||||
set: function (value) { }
|
||||
});
|
||||
o.setter = "";
|
||||
|
||||
var o = { set setter(value) { } }; // OK
|
||||
var o = { set setter(value) { } };
|
||||
o.setter = "";
|
||||
|
||||
var o = {
|
||||
set accessor(value) { }, // OK
|
||||
set accessor(value) { },
|
||||
get accessor() { }
|
||||
};
|
||||
|
||||
@@ -115,24 +115,24 @@
|
||||
o.setter = 87;
|
||||
|
||||
var o = {};
|
||||
Object.defineProperty(o, "prop", {writable:!0,configurable:!0,enumerable:!1, value: getInitialValue()}) // NOT OK
|
||||
Object.defineProperty(o, "prop", {writable:!0,configurable:!0,enumerable:!1, value: getInitialValue()}) // $ Alert
|
||||
o.prop = 42;
|
||||
|
||||
var o = {};
|
||||
Object.defineProperty(o, "prop", {writable:!0,configurable:!0,enumerable:!1, value: undefined}) // OK, default value
|
||||
Object.defineProperty(o, "prop", {writable:!0,configurable:!0,enumerable:!1, value: undefined}) // OK - default value
|
||||
o.prop = 42;
|
||||
|
||||
var o = {};
|
||||
Object.defineProperty(o, "prop", {writable:!0,configurable:!0,enumerable:!1}) // OK
|
||||
Object.defineProperty(o, "prop", {writable:!0,configurable:!0,enumerable:!1})
|
||||
o.prop = 42;
|
||||
|
||||
var o = {};
|
||||
o.pure19 = 42; // OK
|
||||
o.pure19 = 42;
|
||||
o.some_other_property = 42;
|
||||
o.pure19 = 42;
|
||||
|
||||
var o = {};
|
||||
o.pure20 = 42; // OK
|
||||
o.pure20 = 42;
|
||||
some_other_obj.some_other_property = 42;
|
||||
o.pure20 = 42;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user