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

javascript:DuplicatePropertyName also detects static/nonstatic class functions #620

Closed
fxOne opened this issue Jul 6, 2017 · 1 comment
Assignees
Labels
type: false positive Issue is reported when it should NOT be
Milestone

Comments

@fxOne
Copy link

fxOne commented Jul 6, 2017

I want to report a bug.

SonarJS version: 2.21 (build 4409)
SonarQube version: 6.3.1 (build 21392)

Rule key: javascript:DuplicatePropertyName

Reproducer

class {
  myFunc() {  }

  static myFunc() { }
}

I'm getting the error: Rename or remove duplicate property name 'myFunc'.

Expected behavior
Well it may not be a good style to have 2 functions with the same name but as they exists in different scopes I would expect a different error message.

@inverno
Copy link
Contributor

inverno commented Sep 28, 2017

@fxOne the RC with the fix is available here, feel free to test it : https://github.com/SonarSource/sonar-javascript/releases/tag/3.2-RC1

@vilchik-elena vilchik-elena added type: false positive Issue is reported when it should NOT be and removed type: false positive Issue is reported when it should NOT be labels Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: false positive Issue is reported when it should NOT be
Projects
None yet
Development

No branches or pull requests

3 participants