actionview/lib/action_view/template/resolver.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Method find_all has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])
Severity: Minor
Found in actionview/lib/action_view/template/resolver.rb - About 45 mins to fix

    Method _find_all has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def _find_all(name, prefix, partial, details, key, locals)
    Severity: Minor
    Found in actionview/lib/action_view/template/resolver.rb - About 45 mins to fix

      Method _find_all has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def _find_all(name, prefix, partial, details, key, locals)
      Severity: Minor
      Found in actionview/lib/action_view/template/resolver.rb - About 45 mins to fix

        Method find_templates has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def find_templates(name, prefix, partial, details, locals = [])
        Severity: Minor
        Found in actionview/lib/action_view/template/resolver.rb - About 35 mins to fix

          Method template_glob has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

                def template_glob(glob)
                  query = File.join(escape_entry(@path), glob)
                  path_with_slash = File.join(@path, "")
          
                  Dir.glob(query).filter_map do |filename|
          Severity: Minor
          Found in actionview/lib/action_view/template/resolver.rb - About 35 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          There are no issues that match your filters.

          Category
          Status