aceleradora-TW/nao-me-calo

View on GitHub
app/helpers/application_helper.rb

Summary

Maintainability
F
4 days
Test Coverage

Method has too many lines. [597/30]
Open

  def get_bad_word
    bad_words = ["babaca",
      "babacÊo",
      "babacão",
      "babacaum",
Severity: Minor
Found in app/helpers/application_helper.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Module has too many lines. [638/250]
Open

module ApplicationHelper

  def set_average_style(average)
    case average
    when "Péssimo"
Severity: Minor
Found in app/helpers/application_helper.rb by rubocop

This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method get_bad_word has 597 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def get_bad_word
    bad_words = ["babaca",
      "babacÊo",
      "babacão",
      "babacaum",
Severity: Major
Found in app/helpers/application_helper.rb - About 2 days to fix

    File application_helper.rb has 639 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module ApplicationHelper
    
      def set_average_style(average)
        case average
        when "Péssimo"
    Severity: Major
    Found in app/helpers/application_helper.rb - About 1 day to fix

      Avoid too many return statements within this method.
      Open

            return nil
      Severity: Major
      Found in app/helpers/application_helper.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

              return 'concept-excellent'
        Severity: Major
        Found in app/helpers/application_helper.rb - About 30 mins to fix

          Useless assignment to variable - bad_words.
          Open

              bad_words = ["babaca",
          Severity: Minor
          Found in app/helpers/application_helper.rb by rubocop

          This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

          assigned but unused variable - foo

          Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

          Example:

          # bad
          
          def some_method
            some_var = 1
            do_something
          end

          Example:

          # good
          
          def some_method
            some_var = 1
            do_something(some_var)
          end

          There are no issues that match your filters.

          Category
          Status