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 for Performance/FixedSize #54

Closed
dzirtusss opened this issue May 9, 2019 · 0 comments · Fixed by #57
Closed

False Positive for Performance/FixedSize #54

dzirtusss opened this issue May 9, 2019 · 0 comments · Fixed by #57

Comments

@dzirtusss
Copy link

Performance/FixedSize should not be triggered for constants definitions.


Expected behavior

SOME_CONST = "abc".length      # this works ok
SOME_CONST = "abc".length + 1  # should also work and not trigger cop

Actual behavior

SOME_CONST = "abc".length      # this works ok
SOME_CONST = "abc".length + 1  # this triggers Performance/FixedSize

Steps to reproduce the problem

SOME_CONST = "abc".length
SOME_CONST = "abc".length + 1

RuboCop version

0.67.2 (using Parser 2.6.2.1, running on ruby 2.5.3 x86_64-darwin18)
tejasbubane added a commit to tejasbubane/rubocop-performance that referenced this issue May 15, 2019
@koic koic closed this as completed in #57 May 17, 2019
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 a pull request may close this issue.

1 participant