Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_analyzer): fix false positive #3261 #3262

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

ematipico
Copy link
Contributor

@ematipico ematipico commented Sep 21, 2022

Summary

This PR fixes #3261

The fix is simple. It iterates over all the all_reads of the binding and checks if at least one is used as a JsxRefereceIdentifier.

Test Plan

Added a new test case

@netlify
Copy link

netlify bot commented Sep 21, 2022

Deploy Preview for rometools canceled.

Name Link
🔨 Latest commit 34e6111
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/632d5c973696550008b3f72c

@ematipico ematipico temporarily deployed to netlify-playground September 21, 2022 16:09 Inactive
@github-actions
Copy link

github-actions bot commented Sep 21, 2022

Copy link
Contributor

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a more descriptive title. It avoids that I have to open the issue when e.g. going through the commits using git.

@MichaReiser
Copy link
Contributor

!bench_analyzer

@ematipico ematipico changed the title fix(rome_js_analyzer): #3261 fix(rome_js_analyzer): fix false positive #3261 Sep 21, 2022
@github-actions
Copy link

Analyzer Benchmark Results

group                     main                                   pr
-----                     ----                                   --
analyzer/css.js           1.00      2.0±0.03ms     5.8 MB/sec    1.01      2.0±0.02ms     5.7 MB/sec
analyzer/index.js         1.00      5.8±0.01ms     5.6 MB/sec    1.01      5.8±0.03ms     5.6 MB/sec
analyzer/lint.ts          1.00      2.8±0.05ms    14.8 MB/sec    1.01      2.8±0.02ms    14.6 MB/sec
analyzer/parser.ts        1.00      6.9±0.05ms     7.1 MB/sec    1.02      7.0±0.06ms     7.0 MB/sec
analyzer/router.ts        1.00      4.9±0.03ms    12.5 MB/sec    1.01      5.0±0.05ms    12.3 MB/sec
analyzer/statement.ts     1.00      6.8±0.07ms     5.2 MB/sec    1.01      6.9±0.07ms     5.1 MB/sec
analyzer/typescript.ts    1.00     10.5±0.04ms     5.2 MB/sec    1.02     10.7±0.04ms     5.1 MB/sec

@ematipico ematipico temporarily deployed to netlify-playground September 21, 2022 16:27 Inactive
@ematipico
Copy link
Contributor Author

!bench_analyzer

@ematipico ematipico temporarily deployed to netlify-playground September 21, 2022 16:30 Inactive
@github-actions
Copy link

Analyzer Benchmark Results

group                     main                                   pr
-----                     ----                                   --
analyzer/css.js           1.00      2.6±0.07ms     4.5 MB/sec    1.03      2.6±0.13ms     4.4 MB/sec
analyzer/index.js         1.00      7.5±0.41ms     4.3 MB/sec    1.01      7.5±0.34ms     4.3 MB/sec
analyzer/lint.ts          1.00      3.5±0.12ms    11.8 MB/sec    1.12      4.0±0.16ms    10.5 MB/sec
analyzer/parser.ts        1.00      8.6±0.35ms     5.7 MB/sec    1.01      8.6±0.29ms     5.6 MB/sec
analyzer/router.ts        1.00      6.1±0.19ms    10.1 MB/sec    1.03      6.2±0.25ms     9.9 MB/sec
analyzer/statement.ts     1.00      8.7±0.32ms     4.1 MB/sec    1.01      8.7±0.35ms     4.1 MB/sec
analyzer/typescript.ts    1.02     13.8±0.65ms     4.0 MB/sec    1.00     13.5±0.67ms     4.0 MB/sec

@ematipico ematipico temporarily deployed to netlify-playground September 23, 2022 07:13 Inactive
@ematipico
Copy link
Contributor Author

!bench_analyzer

@github-actions
Copy link

Analyzer Benchmark Results

group                     main                                   pr
-----                     ----                                   --
analyzer/css.js           1.00  1954.1±87.00µs     5.9 MB/sec    1.05      2.1±0.12ms     5.6 MB/sec
analyzer/index.js         1.00      5.5±0.24ms     5.9 MB/sec    1.05      5.8±0.28ms     5.6 MB/sec
analyzer/lint.ts          1.00      2.8±0.14ms    15.0 MB/sec    1.00      2.8±0.15ms    15.0 MB/sec
analyzer/parser.ts        1.00      6.8±0.46ms     7.2 MB/sec    1.00      6.7±0.31ms     7.2 MB/sec
analyzer/router.ts        1.00      4.7±0.20ms    13.0 MB/sec    1.00      4.7±0.26ms    13.0 MB/sec
analyzer/statement.ts     1.00      6.5±0.30ms     5.5 MB/sec    1.01      6.5±0.37ms     5.4 MB/sec
analyzer/typescript.ts    1.00     10.6±0.68ms     5.1 MB/sec    1.00     10.7±0.65ms     5.1 MB/sec

@ematipico ematipico merged commit 35eba83 into main Sep 23, 2022
@ematipico ematipico deleted the fix/use-camel-case-32691 branch September 23, 2022 07:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 false positive for useCamelCase
2 participants