diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-24 11:11:18 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-24 11:47:58 -0700 |
commit | 3e001d29ccdb5a5b1ba223710525f8dc7ae844ee (patch) | |
tree | 5046754a8858795a02043a743e18fb8b05610f41 /.rubocop_todo.yml | |
parent | 0d538e44aff066372ecd9d10ac6786681bc347c9 (diff) | |
download | gitlab-ce-3e001d29ccdb5a5b1ba223710525f8dc7ae844ee.tar.gz |
Enable Rubocop Performance/InefficientHashSearchsh-enable-rubocop-hash-search
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
Diffstat (limited to '.rubocop_todo.yml')
-rw-r--r-- | .rubocop_todo.yml | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 41714eefa97..72de4f0b2aa 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -262,17 +262,6 @@ Naming/HeredocDelimiterNaming: Naming/RescuedExceptionsVariableName: Enabled: false -# Offense count: 6 -# Cop supports --auto-correct. -Performance/InefficientHashSearch: - Exclude: - - 'app/controllers/concerns/sessionless_authentication.rb' - - 'app/models/note.rb' - - 'app/models/user_preference.rb' - - 'ee/app/models/ee/project.rb' - - 'lib/gitlab/import_export/members_mapper.rb' - - 'qa/spec/spec_helper.rb' - # Offense count: 3 # Cop supports --auto-correct. Performance/ReverseEach: |