Showing 13 of 71 total issues
File pogoprotos_networking_responses.rb
has 659 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'google/protobuf'
require_relative 'pogoprotos_data'
require_relative 'pogoprotos_inventory'
require_relative 'pogoprotos_data_capture'
File pogoprotos_enums.rb
has 634 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_enum "POGOProtos.Enums.TutorialState" do
value :LEGAL_SCREEN, 0
File pogoprotos_networking_requests_messages.rb
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'google/protobuf'
require_relative 'pogoprotos_enums'
require_relative 'pogoprotos_inventory_item'
require_relative 'pogoprotos_data_player'
Method find_poi
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def find_poi(client, lat, lng)
step_size = 0.0015
step_limit = 49
coords = generate_spiral(lat, lng, step_size, step_limit)
Method parse_rpc_fields
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def parse_rpc_fields(responses)
responses.map! do |x|
x = x.to_hash if x.class.name =~ /POGOProtos/
x
end if responses.is_a?(Array)
- 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 level
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def level
return MAX_LEVEL if leaf?
x = (@id & 0xffffffff)
level = -1
- 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 generate_spiral
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate_spiral(starting_lat, starting_lng, step_size, step_limit)
coords = [{ lat: starting_lat, lng: starting_lng }]
steps = 1
x = 0
y = 0
Method lookup_cells
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.lookup_cells(level, i, j, orig_orientation, pos, orientation)
Method find_poi
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def find_poi(client, lat, lng)
step_size = 0.0015
step_limit = 49
coords = generate_spiral(lat, lng, step_size, step_limit)
- 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 lookup_bits
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.lookup_bits(i, j, orig_orientation, pos, orientation)
Method generate_spiral
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def generate_spiral(starting_lat, starting_lng, step_size, step_limit)
coords = [{ lat: starting_lat, lng: starting_lng }]
steps = 1
x = 0
y = 0
- 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 largest_abs_component
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def largest_abs_component
temp = abs
if temp[0] > temp[1]
temp[0] > temp[2] ? 0 : 2
- 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 add_optional_signature_information
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.add_optional_signature_information(sig, api_client)
%i(android_gps_info sensor_info device_info activity_status location_fix).each do |i|
name = Helpers.camel_case_lower(i)
if api_client.send(i)
- 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"