Showing 659 of 659 total issues
Method has too many lines. [438/30] Open
def set_mesh_buffers(object, hint, should_dispose, material)
return unless @initted_arrays
geometry = object.geometry
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [701/250] Open
class OpenGLRenderer
attr_accessor :auto_clear, :auto_clear_color, :auto_clear_depth, :auto_clear_stencil, :sort_objects, :gamma_factor, :gamma_input,
:gamma_output, :shadow_map_enabled, :shadow_map_type, :shadow_map_cull_face, :shadow_map_debug, :shadow_map_cascade,
:max_morph_targets, :max_morph_normals, :info, :pixel_ratio, :window, :width, :height, :state
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [562/250] Open
class OpenGLGeometryGroup
include OpenGLGeometryLike
attr_reader :id, :material_index
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [530/250] Open
class Matrix4
attr_accessor :elements
DIMENSIONS = 4
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [520/250] Open
class Geometry
include EventDispatcher
MorphNormal = Struct.new(:face_normals, :vertex_normals)
Normal = Struct.new(:a, :b, :c)
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [497/250] Open
class BufferGeometry
include EventDispatcher
DrawCall = Struct.new(:start, :count, :index)
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method set_mesh_buffers
has 438 lines of code (exceeds 25 allowed). Consider refactoring. Open
def set_mesh_buffers(object, hint, should_dispose, material)
return unless @initted_arrays
geometry = object.geometry
Method has too many lines. [139/30] Open
def raycast(raycaster, intersects)
@_inverse_matrix ||= Matrix4.new
@_ray ||= Ray.new
@_sphere ||= Sphere.new
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method raycast
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
def raycast(raycaster, intersects)
@_inverse_matrix ||= Matrix4.new
@_ray ||= Ray.new
@_sphere ||= Sphere.new
- Read upRead up
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
File opengl_renderer.rb
has 728 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'opengl'
require 'glfw'
require 'fiddle'
require 'mittsu/renderers/opengl/opengl_lib'
Method set_mesh_buffers
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def set_mesh_buffers(object, hint, should_dispose, material)
return unless @initted_arrays
geometry = object.geometry
- Read upRead up
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
Method has too many lines. [120/30] Open
def render(scene, camera)
return unless @renderer.shadow_map_enabled
lights = []
fog = nil
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class OpenGLRenderer
has 77 methods (exceeds 20 allowed). Consider refactoring. Open
class OpenGLRenderer
attr_accessor :auto_clear, :auto_clear_color, :auto_clear_depth, :auto_clear_stencil, :sort_objects, :gamma_factor, :gamma_input,
:gamma_output, :shadow_map_enabled, :shadow_map_type, :shadow_map_cull_face, :shadow_map_debug, :shadow_map_cascade,
:max_morph_targets, :max_morph_normals, :info, :pixel_ratio, :window, :width, :height, :state
Method has too many lines. [112/30] Open
def compute_tangents
# based on http://www.terathon.com/code/tangent.html
# (per vertex tangents)
if [:index, :position, :normal, :uv].any { |s| !@attributes.has_key?}
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [100/30] Open
def initialize(radius_top = 20.0, radius_bottom = 20.0, height = 100.0, radial_segments = 8, height_segments = 1, open_ended = false, theta_start = 0.0, theta_length = (::Math::PI * 2.0))
super()
@type = 'CylinderGeometry'
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
File opengl_geometry_group.rb
has 567 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'mittsu/renderers/opengl/opengl_geometry_like'
module Mittsu
class OpenGLGeometryGroup
include OpenGLGeometryLike
Method has too many lines. [97/30] Open
def load_uniforms_generic(uniforms)
uniforms.each do |(uniform, location)|
# needs_update property is not added to all uniforms.
next if uniform.needs_update == false || location == -1
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [264/250] Open
class Quaternion
EPS = 0.000001
attr_reader :x, :y, :z, :w
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [263/250] Open
class ShadowMapPlugin
def initialize(renderer, lights, opengl_objects, opengl_objects_immediate)
@renderer, @lights = renderer, lights
@opengl_objects = opengl_objects
@opengl_objects_immediate = opengl_objects_immediate
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
File matrix4.rb
has 534 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Mittsu
class Matrix4
attr_accessor :elements
DIMENSIONS = 4