loomio/loomio

View on GitHub
app/helpers/dev/fake_data_helper.rb

Summary

Maintainability
C
1 day
Test Coverage

File fake_data_helper.rb has 387 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module Dev::FakeDataHelper
  private

  def saved(obj)
    obj.tap(&:save!)
Severity: Minor
Found in app/helpers/dev/fake_data_helper.rb - About 5 hrs to fix

    Method create_chatbots_for_group has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def create_chatbots_for_group(group)
        event_kinds = %w[
          new_discussion
          discussion_edited
          poll_created
    Severity: Major
    Found in app/helpers/dev/fake_data_helper.rb - About 2 hrs to fix

      Method fake_poll has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def fake_poll(args = {})
          names = option_names(args.delete(:option_count) || (2..7).to_a.sample)
      
          closing_at = args[:wip] ? nil : 3.days.from_now
          options = {
      Severity: Minor
      Found in app/helpers/dev/fake_data_helper.rb - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status