Skip to content

False negative Sequel/ConcurrentIndex in some cases. Ignores options passed in hash. #15

@PapevisO

Description

@PapevisO

Ignores options passed in an options hash along with gin_trgm_ops relevant with pg_trgm extension.
This way concurrently: true, though provided, is not detected by linter.

Sequel.migration do
  no_transaction

  up do
    DB.execute('CREATE EXTENSION IF NOT EXISTS pg_trgm;')
    alter_table(:foos) do
      opts = {
        name: :foos_bar_search_index,
        type: :gin,
        concurrently: true
      }
      add_index(Sequel.lit(" gin_trgm_ops"), opts)
    end
  end
end

Issue produced with the following version

GIT
  remote: git://github.com/rubocop-hq/rubocop-sequel.git
  revision: 99fc07d33c6dd4a2b38627316764ab2cc7ce750c
  ref: 99fc07d33c6dd4a2b38627316764ab2cc7ce750c
  specs:
    rubocop-sequel (0.1.0)
      rubocop (~> 1.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions