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

False positive in javascript.lang.correctness.useless-assign.useless-assignment #3036

Open
Sjord opened this issue Aug 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Sjord
Copy link
Contributor

Sjord commented Aug 10, 2023

semgrep-rules/javascript/lang/correctness/useless-assign.yaml at develop · returntocorp/semgrep-rules

test.js:

const { foo } = require('foo')
const { bar } = require('bar')
$ semgrep -c 'r/javascript.lang.correctness.useless-assign.useless-assignment' test.js
...
┌────────────────┐
│ 1 Code Finding │
└────────────────┘

    test.js
       javascript.lang.correctness.useless-assign.useless-assignment
          `const` is assigned twice; the first assignment is useless
          Details: https://sg.run/0Q9w

            2┆ const { foo } = require('foo')
            3┆ const { bar } = require('bar')
@Sjord Sjord added the bug Something isn't working label Aug 10, 2023
@nashcontrol
Copy link
Contributor

nashcontrol commented Aug 13, 2023

I thought it was related to the regex implementation - semgrep/semgrep#5216 (comment)

maybe this one is duplicate of semgrep/semgrep#7531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants