NullVoxPopuli/skinny_controllers

View on GitHub
lib/skinny_controllers/operation/base.rb

Summary

Maintainability
A
45 mins
Test Coverage

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

      def initialize(current_user,
        controller_params, params_for_action = nil,
        action = nil,
        lookup = nil,
        options = {})
Severity: Minor
Found in lib/skinny_controllers/operation/base.rb - About 45 mins to fix

    Avoid parameter lists longer than 5 parameters. [6/5] (https://github.com/bbatsov/ruby-style-guide#too-many-params)
    Open

          def initialize(current_user,
            controller_params, params_for_action = nil,
            action = nil,
            lookup = nil,
            options = {})

    This cop checks for methods with too many parameters. The maximum number of parameters is configurable. Keyword arguments can optionally be excluded from the total count.

    Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code)
    Open

    module SkinnyControllers

    Checks for a newline after the final magic comment.

    Example:

    # good
    # frozen_string_literal: true
    
    # Some documentation for Person
    class Person
      # Some code
    end
    
    # bad
    # frozen_string_literal: true
    # Some documentation for Person
    class Person
      # Some code
    end

    There are no issues that match your filters.

    Category
    Status