-
- Downloads
Enable Rubocop Performance/InefficientHashSearch
When used with a Hash, `.keys.include?` is bad because: 1. It performs a O(n) search instead of the efficient `.has_key?` 2. It clones all keys into separate array. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64975
Showing
- .rubocop_todo.yml 0 additions, 11 deletions.rubocop_todo.yml
- app/controllers/concerns/sessionless_authentication.rb 1 addition, 1 deletionapp/controllers/concerns/sessionless_authentication.rb
- app/models/note.rb 1 addition, 1 deletionapp/models/note.rb
- app/models/user_preference.rb 1 addition, 1 deletionapp/models/user_preference.rb
- qa/spec/spec_helper.rb 1 addition, 1 deletionqa/spec/spec_helper.rb
Please register or sign in to comment