mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
flag less overly general functions with js/unneeded-defensive-code
This commit is contained in:
@@ -176,4 +176,11 @@
|
||||
u && (u.p, f()); // technically not OK, but it seems like an unlikely pattern
|
||||
u && !u.p; // NOT OK
|
||||
u && !u(); // NOT OK
|
||||
|
||||
|
||||
function hasCallbacks(success, error) {
|
||||
if (success) success()
|
||||
if (error) error()
|
||||
}
|
||||
hasCallbacks(() => {}, null);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user