danini-the-panini/mittsu-opengl

View on GitHub
lib/mittsu/opengl_implementation/objects/point_cloud.rb

Summary

Maintainability
A
45 mins
Test Coverage
A
100%

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

    def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)
Severity: Minor
Found in lib/mittsu/opengl_implementation/objects/point_cloud.rb - About 45 mins to fix

    Avoid parameter lists longer than 5 parameters. [6/5]
    Open

        def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)

    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.

    Unused method argument - material. If it's necessary, use _ or _material as an argument name to indicate that it won't be used.
    Open

        def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)

    This cop checks for unused method arguments.

    Example:

    # bad
    
    def some_method(used, unused, _unused_but_allowed)
      puts used
    end

    Example:

    # good
    
    def some_method(used, _unused, _unused_but_allowed)
      puts used
    end

    Unused method argument - fog. If it's necessary, use _ or _fog as an argument name to indicate that it won't be used.
    Open

        def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)

    This cop checks for unused method arguments.

    Example:

    # bad
    
    def some_method(used, unused, _unused_but_allowed)
      puts used
    end

    Example:

    # good
    
    def some_method(used, _unused, _unused_but_allowed)
      puts used
    end

    Unused method argument - camera. If it's necessary, use _ or _camera as an argument name to indicate that it won't be used.
    Open

        def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)

    This cop checks for unused method arguments.

    Example:

    # bad
    
    def some_method(used, unused, _unused_but_allowed)
      puts used
    end

    Example:

    # good
    
    def some_method(used, _unused, _unused_but_allowed)
      puts used
    end

    Unused method argument - lights. If it's necessary, use _ or _lights as an argument name to indicate that it won't be used.
    Open

        def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)

    This cop checks for unused method arguments.

    Example:

    # bad
    
    def some_method(used, unused, _unused_but_allowed)
      puts used
    end

    Example:

    # good
    
    def some_method(used, _unused, _unused_but_allowed)
      puts used
    end

    Unused method argument - update_buffers. If it's necessary, use _ or _update_buffers as an argument name to indicate that it won't be used.
    Open

        def render_buffer(camera, lights, fog, material, geometry_group, update_buffers)

    This cop checks for unused method arguments.

    Example:

    # bad
    
    def some_method(used, unused, _unused_but_allowed)
      puts used
    end

    Example:

    # good
    
    def some_method(used, _unused, _unused_but_allowed)
      puts used
    end

    There are no issues that match your filters.

    Category
    Status