app/templates/documents.rb

Summary

Maintainability
B
4 hrs
Test Coverage

Class has too many lines. [247/100]
Wontfix

class Documents
  include Templatable
  LIGHT_STEMMERS = {
    de: 'german',
    es: 'spanish',
Severity: Minor
Found in app/templates/documents.rb by rubocop

Checks if the length of a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

You can set constructs you want to fold with CountAsOne. Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct will be counted as one line regardless of its actual size.

Example: CountAsOne: ['array', 'heredoc', 'method_call']

class Foo
  ARRAY = [         # +1
    1,
    2
  ]

  HASH = {          # +3
    key: 'value'
  }

  MSG = <<~HEREDOC  # +1
    Heredoc
    content.
  HEREDOC

  foo(              # +1
    1,
    2
  )
end                 # 6 points

NOTE: This cop also applies for Struct definitions.

Class Documents has 33 methods (exceeds 20 allowed). Consider refactoring.
Open

class Documents
  include Templatable
  LIGHT_STEMMERS = {
    de: 'german',
    es: 'spanish',
Severity: Minor
Found in app/templates/documents.rb - About 4 hrs to fix

    File documents.rb has 264 lines of code (exceeds 250 allowed). Consider refactoring.
    Wontfix

    class Documents
      include Templatable
      LIGHT_STEMMERS = {
        de: 'german',
        es: 'spanish',
    Severity: Minor
    Found in app/templates/documents.rb - About 2 hrs to fix

      Method has too many lines. [15/10]
      Open

        def tokenizer(json)
          json.tokenizer do
            json.kuromoji do
              json.type('kuromoji_tokenizer')
              json.mode('search')
      Severity: Minor
      Found in app/templates/documents.rb by rubocop

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

      You can set constructs you want to fold with CountAsOne. Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct will be counted as one line regardless of its actual size.

      NOTE: The ExcludedMethods and IgnoredMethods configuration is deprecated and only kept for backwards compatibility. Please use AllowedMethods and AllowedPatterns instead. By default, there are no methods to allowed.

      Example: CountAsOne: ['array', 'heredoc', 'method_call']

      def m
        array = [       # +1
          1,
          2
        ]
      
        hash = {        # +3
          key: 'value'
        }
      
        <<~HEREDOC      # +1
          Heredoc
          content.
        HEREDOC
      
        foo(            # +1
          1,
          2
        )
      end               # 6 points

      Method has too many lines. [15/10]
      Open

        def body
          Jbuilder.encode do |json|
            json.index_patterns("*-#{I14y::APP_NAME}-documents-*")
            json.settings do
              json.analysis do
      Severity: Minor
      Found in app/templates/documents.rb by rubocop

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

      You can set constructs you want to fold with CountAsOne. Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct will be counted as one line regardless of its actual size.

      NOTE: The ExcludedMethods and IgnoredMethods configuration is deprecated and only kept for backwards compatibility. Please use AllowedMethods and AllowedPatterns instead. By default, there are no methods to allowed.

      Example: CountAsOne: ['array', 'heredoc', 'method_call']

      def m
        array = [       # +1
          1,
          2
        ]
      
        hash = {        # +3
          key: 'value'
        }
      
        <<~HEREDOC      # +1
          Heredoc
          content.
        HEREDOC
      
        foo(            # +1
          1,
          2
        )
      end               # 6 points

      Method has too many lines. [14/10]
      Open

        def language_templates(json)
          LANGUAGE_ANALYZER_LOCALES.each do |locale|
            json.child! do
              json.set!(locale) do
                json.match("*_#{locale}")
      Severity: Minor
      Found in app/templates/documents.rb by rubocop

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

      You can set constructs you want to fold with CountAsOne. Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct will be counted as one line regardless of its actual size.

      NOTE: The ExcludedMethods and IgnoredMethods configuration is deprecated and only kept for backwards compatibility. Please use AllowedMethods and AllowedPatterns instead. By default, there are no methods to allowed.

      Example: CountAsOne: ['array', 'heredoc', 'method_call']

      def m
        array = [       # +1
          1,
          2
        ]
      
        hash = {        # +3
          key: 'value'
        }
      
        <<~HEREDOC      # +1
          Heredoc
          content.
        HEREDOC
      
        foo(            # +1
          1,
          2
        )
      end               # 6 points

      Method has too many lines. [11/10]
      Open

        def analyzer(json)
          json.analyzer do
            generic_analyzers(json)
            french_analyzer(json)
            japanese_analyzer(json)
      Severity: Minor
      Found in app/templates/documents.rb by rubocop

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

      You can set constructs you want to fold with CountAsOne. Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct will be counted as one line regardless of its actual size.

      NOTE: The ExcludedMethods and IgnoredMethods configuration is deprecated and only kept for backwards compatibility. Please use AllowedMethods and AllowedPatterns instead. By default, there are no methods to allowed.

      Example: CountAsOne: ['array', 'heredoc', 'method_call']

      def m
        array = [       # +1
          1,
          2
        ]
      
        hash = {        # +3
          key: 'value'
        }
      
        <<~HEREDOC      # +1
          Heredoc
          content.
        HEREDOC
      
        foo(            # +1
          1,
          2
        )
      end               # 6 points

      There are no issues that match your filters.

      Category
      Status