File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
javascript/ql/test/query-tests/Statements/UselessConditional Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -2,32 +2,32 @@ function getLastLine(input) {
22 var lines = [ ] , nextLine ;
33 while ( ( nextLine = readNextLine ( input ) ) )
44 lines . push ( nextLine ) ;
5- if ( ! lines )
5+ if ( ! lines ) // $ Alert
66 throw new Error ( "No lines!" ) ;
77 return lines [ lines . length - 1 ] ;
88}
99
1010function lookup ( cache , k ) {
1111 var v ;
12- return k in cache ? cache [ k ] : ( v = new Entry ( recompute ( ) ) ) && ( cache [ k ] = v ) ;
12+ return k in cache ? cache [ k ] : ( v = new Entry ( recompute ( ) ) ) && ( cache [ k ] = v ) ; // $ Alert
1313}
1414
1515function test ( a , b ) {
1616 if ( ! a && ! b ) {
17- if ( a ) ;
18- if ( b ) ;
17+ if ( a ) ; // $ Alert
18+ if ( b ) ; // $ Alert
1919 }
2020 if ( ! ( a || b ) ) {
21- if ( a ) ;
22- if ( b ) ;
21+ if ( a ) ; // $ Alert
22+ if ( b ) ; // $ Alert
2323 }
2424
2525 var x = new X ( ) ;
26- if ( x ) { }
27- if ( new X ( ) ) { }
28- if ( ( x ) ) { }
29- if ( ( ( x ) ) ) { }
30- if ( ( new X ( ) ) ) { }
26+ if ( x ) { } // $ Alert
27+ if ( new X ( ) ) { } // $ Alert
28+ if ( ( x ) ) { } // $ Alert
29+ if ( ( ( x ) ) ) { } // $ Alert
30+ if ( ( new X ( ) ) ) { } // $ Alert
3131
3232 x = 0n ;
3333 if ( x ) // $ Alert
@@ -51,7 +51,7 @@ async function awaitFlow(){
5151 var known = knownF ( ) ;
5252 if ( known )
5353 return ;
54- if ( known )
54+ if ( known ) // $ Alert
5555 return ;
5656
5757 var unknown = unknownF ( ) ;
@@ -86,7 +86,7 @@ async function awaitFlow(){
8686} ) ;
8787
8888( function ( ) {
89- if ( ( x , true ) ) ;
89+ if ( ( x , true ) ) ; // $ Alert
9090} ) ;
9191
9292( function ( x , y ) {
You can’t perform that action at this time.
0 commit comments