18F/dolores-landingham-slack-bot

View on GitHub
db/migrate/20160920181736_split_scheduled_messages_into_onboarding_messages_and_quarterly_messages.rb

Summary

Maintainability
A
1 hr
Test Coverage

Method up has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def up
    # Create tables for new models
    create_table :onboarding_messages do |t|
      t.timestamps null: false
      t.string :title, null: false

    Use %i or %I for an array of symbols.
    Open

          [:employee_id, :scheduled_message_id],

    This cop can check for array literals made up of symbols that are not using the %i() syntax.

    Alternatively, it checks for symbol arrays using the %i() syntax on projects which do not want to use that syntax.

    Configuration option: MinSize If set, arrays with fewer elements than this value will not trigger the cop. For example, a MinSize of3` will not enforce a style on an array of 2 or fewer elements.

    Example: EnforcedStyle: percent (default)

    # good
    %i[foo bar baz]
    
    # bad
    [:foo, :bar, :baz]

    Example: EnforcedStyle: brackets

    # good
    [:foo, :bar, :baz]
    
    # bad
    %i[foo bar baz]

    Use %i or %I for an array of symbols.
    Open

          [:employee_id, :message_id, :message_type],

    This cop can check for array literals made up of symbols that are not using the %i() syntax.

    Alternatively, it checks for symbol arrays using the %i() syntax on projects which do not want to use that syntax.

    Configuration option: MinSize If set, arrays with fewer elements than this value will not trigger the cop. For example, a MinSize of3` will not enforce a style on an array of 2 or fewer elements.

    Example: EnforcedStyle: percent (default)

    # good
    %i[foo bar baz]
    
    # bad
    [:foo, :bar, :baz]

    Example: EnforcedStyle: brackets

    # good
    [:foo, :bar, :baz]
    
    # bad
    %i[foo bar baz]

    There are no issues that match your filters.

    Category
    Status