danini-the-panini/mittsu

View on GitHub

Showing 659 of 659 total issues

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

unexpected token tRCURLY (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

        }.reject { |k,v| v.nil? || v == [] },
Severity: Minor
Found in lib/mittsu/core/object_3d.rb by rubocop

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

Unused block argument - m. You can omit the argument if you don't care about it.
Open

        num_morph_normals.times do |m|

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

      if @renderer.shadow_map_cull_face = CullFaceFront

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
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

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z, _w = @x, @y, @z, @w
Severity: Minor
Found in lib/mittsu/math/quaternion.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

unexpected token tCOMMA (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

        }.reject { |k,v| v.nil? || v == [] },
Severity: Minor
Found in lib/mittsu/core/object_3d.rb by rubocop

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 block argument - scancode. If it's necessary, use _ or _scancode as an argument name to indicate that it won't be used.
Open

        @key_callback = ::GLFW::create_callback(:GLFWkeyfun) do |window_handle, key, scancode, action, mods|
Severity: Minor
Found in lib/mittsu/renderers/glfw_window.rb by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

Do not use prefix _ for a variable that is used.
Open

      _x, _y, _z = *@elements
Severity: Minor
Found in lib/mittsu/math/vector3.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
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
Severity
Category
Status
Source
Language