Napalys Klicius
c97da2eda5
Exclude expressions that are part of a conditional expression
2025-06-10 10:56:11 +02:00
Napalys Klicius
b7f7092ab3
Added test cases for better test coverage
2025-06-10 09:37:40 +02:00
Napalys Klicius
aac56e089a
JavaScript: Fix false positive on Flow type annotations in ExprHasNoEffect
2025-06-03 15:26:22 +02:00
Napalys Klicius
46b5ded862
JS: Enhance void context propagation
2025-06-03 15:20:55 +02:00
Napalys Klicius
bf48b59874
JS: Removed exclusion of FunctionExpr from compound statements.
2025-06-03 15:12:26 +02:00
Napalys Klicius
bca1bc7153
JS: Enhance isDomProperty to check for getAPropertyRead on DOM nodes
2025-06-02 14:56:45 +02:00
Napalys Klicius
9b2ef8be10
JS: add test for DOM access where expression appears to have no side effects
2025-06-02 14:54:46 +02:00
Asger F
6a47678b60
JS: Fix broken alert comment in HeterogenousComparison
2025-03-10 14:23:43 +01:00
Asger F
2a194a53af
raw test output
2025-02-28 13:29:39 +01:00
Asger F
7bd01bf039
JS: Bulk update in UnneededDefensiveProgramming test
...
The history of updates to this test got messed up so just squashing
into one commit.
Some possible regressions have been accepted, but the query is strangely
opinionated so it's just hard to say what it ought to flag.
2025-02-28 13:29:33 +01:00
Asger F
87ed86e4fd
JS: Update UnusedOrUndefinedStateProperty
...
Using RelatedLocations to add clarity
2025-02-28 13:29:18 +01:00
Asger F
6cf1334c6d
Fix comment style in UnboundEventHandlerReceiver
2025-02-28 13:29:12 +01:00
Asger F
22c218d665
JS: Mark a 'good' test as 'bad' and add Alert marker
...
The lack of whitespace around '&&' is problematic
2025-02-28 13:27:58 +01:00
Asger F
a9b263f465
JS: Remove incorrect alert expectation
...
This is not flagged and AFAICT it shouldn't be
2025-02-28 13:27:57 +01:00
Asger F
10a7294327
JS: Accept trivial test changes
...
This adds Alert annotations for alerts that seem intentional by the test
but has not been annotated with 'NOT OK', or the comment was in the wrong
place.
In a few cases I included 'Source' expectations to make it easier to see
what happened. Other 'Source' expectations will be added in bulk a later
commit.
2025-02-28 13:27:43 +01:00
Asger F
f5911c9e5a
JS: Accept raw test output
2025-02-28 13:27:38 +01:00
Asger F
d0ce53ed82
JS: Enable post-processing for all .qlref files
2025-02-28 13:27:33 +01:00
Asger F
426edd55f2
JS: Update output after line number change
...
Some OK-style comments had to be moved to the following line, shifting line numbers.
In selected range also included the comments themselves.
Lastly, the result sets were reordered by the CLI in some cases.
2025-02-28 13:27:31 +01:00
Asger F
9be041e27d
JS: Update OK-style comments to $-style
2025-02-28 13:27:28 +01:00
Asger F
a0b49b23f5
JS: Add UseServer and UseClient directives
2024-03-26 09:39:39 +01:00
erik-krogh
688afddaf2
Re-order expected test output of all JS tests
2023-10-31 16:38:22 +01:00
erik-krogh
368f84785b
fix some more style-guide violations in the alert-messages
2022-10-07 11:22:22 +02:00
erik-krogh
a50234adb0
apply suggestion from review
2022-08-23 15:41:37 +02:00
erik-krogh
1a7d3ee831
update expected output after changing queries
2022-08-23 12:35:32 +02:00
erik-krogh
7e0bd5bde4
update expected output of tests
2022-08-22 21:41:47 +02:00
Max Schaefer
47e425a184
Improve inVoidContext to take conditional expressions into account.
2022-05-30 12:37:50 +02:00
JrXnm
1a1a7413c2
JS: Improv inter-procedural type inference for FunctionExpr
2021-12-10 01:09:49 +08:00
Asger Feldthaus
b5db4047a0
JS: Exclude template files in SelfAssignment
2021-09-15 08:59:47 +02:00
CodeQL CI
653c900d62
Merge pull request #4987 from erik-krogh/defensiveFunctions
...
Approved by esbena
2021-02-02 14:47:23 -08:00
Erik Krogh Kristensen
d86705fe7a
remove benign result for js/whitespace-contradicts-precedence related to " | 0" expressions
2021-01-25 10:43:39 +01:00
Erik Krogh Kristensen
bf518f1c90
flag less overly general functions with js/unneeded-defensive-code
2021-01-20 15:48:12 +01:00
CodeQL CI
897d8de65a
Merge pull request #4523 from erik-krogh/optionalPromise
...
Approved by asgerf
2020-10-21 00:34:12 -07:00
Erik Krogh Kristensen
bdbc8f5c91
add support for OptionalUse in js/missing-await
2020-10-20 16:52:57 +02:00
Erik Krogh Kristensen
7d87699e42
add test for modern compound assignment in js/implicit-operand-conversion
2020-10-20 10:50:20 +02:00
Asger Feldthaus
f9b796231b
JS: Add regression tests
2020-06-25 11:10:27 +01:00
Asger Feldthaus
ea3560fe07
JS: Ignore document.all checks explicitly
2020-06-25 11:03:06 +01:00
Erik Krogh Kristensen
3ce60733cc
add test case
2020-05-11 13:11:24 +02:00
Erik Krogh Kristensen
eb7e0d6a62
still flag single-expression files that contain a function
2020-05-04 18:37:26 +02:00
semmle-qlci
2b055de4d6
Merge pull request #3154 from erik-krogh/ImplicitConv
...
Approved by asgerf
2020-04-29 16:05:19 +01:00
Erik Krogh Kristensen
427c32f211
report a local variable as the misspelling if there any many occourances of the global
2020-04-17 11:25:23 +02:00
Asger Feldthaus
3a9d047cf5
JS: Ignore delete expressions in js/missing-await
2020-04-02 11:35:09 +01:00
Asger Feldthaus
ccce0205b4
JS: Add test
2020-04-02 11:34:07 +01:00
Erik Krogh Kristensen
f55005a0ec
more precise warning message for implicit string/number conversions
2020-03-30 11:17:56 +02:00
Asger Feldthaus
816968d102
JS: Rename test files to avoid clash
2020-03-26 11:59:57 +00:00
Erik Krogh Kristensen
e88dac3dea
remove FP for js/redundant-operation
2020-03-11 14:42:32 +01:00
Asger Feldthaus
77105f6572
JS: Do not flag void operands MissingAwait
2020-02-19 09:30:03 +00:00
Asger Feldthaus
6d9306366c
JS: ignore useless-expr in first stmt in try block
2020-01-15 11:49:23 +00:00
Max Schaefer
308da0774d
Merge pull request #2525 from asger-semmle/promise-missing-await
...
JS: New query: missing await
2020-01-08 15:29:45 +00:00
Asger F
30a8769dad
JS: Add more bad promise contexts
2020-01-03 14:12:55 +00:00
Erik Krogh Kristensen
c22d3d0b3a
add test for block-level flow type annotations
2020-01-03 11:07:35 +01:00