Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FP S6594 (sonar-prefer-regexp-exec): Ignore match count use case #4540

Merged
merged 3 commits into from Jan 31, 2024

Conversation

yassin-kammoun-sonarsource
Copy link
Contributor

Fixes #4532

* Extracts the left-hand side variable of expressions
* like `x` in `const x = <node>` or `x` in `x = <node>`.
*/
function getLhsVariable(node: estree.Node) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arf, I forgot to replace this one with my implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nevermind, I think I will keep my duplicate because the function signature is a bit different, and I am not sure I would like to merge both and impact other rules.

Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
Copy link
Contributor

@ilia-kebets-sonarsource ilia-kebets-sonarsource left a comment

Choose a reason for hiding this comment

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

See my comments, otherwise LGTM!

@yassin-kammoun-sonarsource yassin-kammoun-sonarsource merged commit 9cdfd47 into master Jan 31, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix FP S6594 (sonar-prefer-regexp-exec): Ignore match count use case
2 participants