File tree Expand file tree Collapse file tree 7 files changed +17
-17
lines changed
javascript/ql/test/query-tests
ImplicitOperandConversion
LanguageFeatures/IllegalInvocation
React/UnusedOrUndefinedStateProperty Expand file tree Collapse file tree 7 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ function l() {
74
74
x ** 2 ; // $ Alert
75
75
}
76
76
77
- 1n + 1 ; // $ MISSED : Alert
77
+ 1n + 1 ; // $ MISSING : Alert
78
78
79
79
( function ( ) {
80
80
let sum = 0 ;
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ function useThingPossiblySync(b) {
59
59
60
60
if ( thing == null ) { }
61
61
62
- return thing + "bar" ; // $ MISSED : Alert
62
+ return thing + "bar" ; // $ MISSING : Alert
63
63
}
64
64
65
65
function useThingInVoid ( ) {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function foo() {
6
6
7
7
function bar ( ) {
8
8
var g ;
9
- g ( ) ; // $ MISSED : Alert
9
+ g ( ) ; // $ MISSING : Alert
10
10
eval ( "g = alert" ) ;
11
11
}
12
12
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ let c = new C();
12
12
C ( ) ; // $ Alert
13
13
new ( x => x ) ; // $ Alert
14
14
c . m ( ) ;
15
- new c . m ( ) ; // $ MISSED : Alert
15
+ new c . m ( ) ; // $ MISSING : Alert
16
16
17
17
var o = {
18
18
f : function ( ) { } ,
@@ -21,7 +21,7 @@ var o = {
21
21
o . f ( ) ;
22
22
new o . f ( ) ;
23
23
o . g ( ) ;
24
- new o . g ( ) ; // $ MISSED : Alert
24
+ new o . g ( ) ; // $ MISSING : Alert
25
25
26
26
function f ( b ) {
27
27
var g ;
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ class C1 extends React.Component {
9
9
}
10
10
}
11
11
12
- class C2 extends React . Component {
12
+ class C2 extends React . Component { // $ Alert
13
13
14
14
state = {
15
- p1 : ''
15
+ p1 : '' // $ RelatedLocation
16
16
}
17
17
18
18
static getDerivedStateFromProps_unmodeled ( props , state ) {
Original file line number Diff line number Diff line change 1
- class C1 extends React . Component {
1
+ class C1 extends React . Component { // $ Alert
2
2
constructor ( ) {
3
3
this . state . writtenDirectly = 42 ;
4
4
this . setState ( {
5
5
writtenInSetState : 42
6
6
} ) ;
7
7
this . state . writtenInOtherMethod ;
8
- this . state . notWritten ; // $ Alert
9
- this . state . notWrittenButReadInChain ; // $ Alert
8
+ this . state . notWritten ; // $ RelatedLocation
9
+ this . state . notWrittenButReadInChain ; // $ RelatedLocation
10
10
this . state . writtenDirectly ;
11
11
this . state . writtenInSetState ;
12
12
@@ -29,10 +29,10 @@ class C2 extends React.Component {
29
29
}
30
30
31
31
32
- class C3 extends React . Component {
32
+ class C3 extends React . Component { // $ Alert
33
33
constructor ( ) {
34
34
this . state . writtenThrougExternalPropertyAccess ;
35
- this . state . notWrittenThrougExternalPropertyAccess ; // $ Alert
35
+ this . state . notWrittenThrougExternalPropertyAccess ; // $ RelatedLocation
36
36
}
37
37
}
38
38
Original file line number Diff line number Diff line change 1
- class C1 extends React . Component {
1
+ class C1 extends React . Component { // $ Alert
2
2
constructor ( ) {
3
3
this . state . readDirectly = 42 ;
4
4
this . state . readInChain = { } ;
5
5
this . state . readInOtherMethod = { } ;
6
- this . state . notRead = 42 ; // $ Alert
6
+ this . state . notRead = 42 ; // $ RelatedLocation
7
7
this . state . readDirectly ;
8
8
this . state . readInChain . foo ;
9
9
}
@@ -18,16 +18,16 @@ function f(s){
18
18
}
19
19
class C2 extends React . Component {
20
20
constructor ( ) {
21
- this . state . readWhenEscaped = 42 ; // $ Alert
21
+ this . state . readWhenEscaped = 42 ; // $ MISSING: Alert
22
22
f ( this . state ) ;
23
23
}
24
24
}
25
25
26
26
27
- class C3 extends React . Component {
27
+ class C3 extends React . Component { // $ Alert
28
28
constructor ( ) {
29
29
this . state . readThrougExternaPropertyAccess = 42 ;
30
- this . state . notReadThrougExternaPropertyAccess = 42 ; // $ Alert
30
+ this . state . notReadThrougExternaPropertyAccess = 42 ; // $ RelatedLocation
31
31
}
32
32
}
33
33
You can’t perform that action at this time.
0 commit comments