Showing 9 of 25 total issues
File vector_ephemeris_parser.rb
has 4347 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'date'
module Tengai
class VectorEphemerisParser
def self.parse(data, ephemeris_table_parser=EphemerisTableParser)
data = data.unpack('c*') if data.is_a? String
Method parse
has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring. Open
Open
def self.parse(data, ephemeris_table_parser=EphemerisTableParser)
data = data.unpack('c*') if data.is_a? String
eof = data.length
- 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 parse
has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring. Open
Open
def self.parse(data)
data = data.unpack('c*') if data.is_a? String
eof = data.length
- 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 parse
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.parse(data, ephemeris_table_parser=EphemerisTableParser)
data = data.unpack('c*') if data.is_a? String
eof = data.length
Method parse
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.parse(data)
data = data.unpack('c*') if data.is_a? String
eof = data.length
File body_data_sheet_parser.rb
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'date'
module Tengai
class BodyDataSheetParser
def self.parse(data)
Method receive_data
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def receive_data(data)
case data
when Prompts::DEFAULT
send_command 'E'
when Prompts::TABLE
Avoid deeply nested control flow statements. Open
Open
case _ephemeris_parser_actions[_acts - 1]
when 0 then
# line 6 "ext/horizons/vector_ephemeris_parser.rl"
begin
mark = p end
Avoid deeply nested control flow statements. Open
Open
case _body_data_sheet_parser_actions[_acts - 1]
when 0 then
# line 5 "ext/horizons/body_data_sheet_parser.rl"
begin
mark = p end