Fixed issue where a custom pipe method which returns non stream would be flagged by the query

This commit is contained in:
Napalys Klicius
2025-05-20 14:43:14 +02:00
parent ef1bde554a
commit 30f2815503
3 changed files with 48 additions and 7 deletions

View File

@@ -9,8 +9,5 @@
| test.js:116:5:116:21 | stream.pipe(dest) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
| test.js:125:5:125:26 | getStre ... e(dest) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
| test.js:143:5:143:62 | stream. ... itable) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
| test.js:147:5:147:28 | notStre ... itable) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
| test.js:151:20:151:43 | notStre ... itable) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
| test.js:157:47:157:74 | someVar ... ething) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
| test.js:163:5:163:20 | notStream.pipe() | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |
| test.js:167:5:167:36 | notStre ... , arg3) | Stream pipe without error handling on the source stream. Errors won't propagate downstream and may be silently dropped. |

View File

@@ -144,17 +144,17 @@ function test() {
}
{ // Non-stream with pipe method that returns subscribable object (Streams do not have subscribe method)
const notStream = getNotAStream();
notStream.pipe(writable).subscribe(); // $SPURIOUS:Alert
notStream.pipe(writable).subscribe();
}
{ // Non-stream with pipe method that returns subscribable object (Streams do not have subscribe method)
const notStream = getNotAStream();
const result = notStream.pipe(writable); // $SPURIOUS:Alert
const result = notStream.pipe(writable);
const dealWithResult = (result) => { result.subscribe(); };
dealWithResult(result);
}
{ // Non-stream with pipe method that returns subscribable object (Streams do not have subscribe method)
const notStream = getNotAStream();
const pipeIt = (someVariable) => { return someVariable.pipe(something); }; // $SPURIOUS:Alert
const pipeIt = (someVariable) => { return someVariable.pipe(something); };
let x = pipeIt(notStream);
x.subscribe();
}