Showing 51 of 57 total issues
Method arg_offsets
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def arg_offsets(start_offset, end_offset)
cmd_arg = ''
# start offset
# -ss Seek to given time position in seconds. hh:mm:ss[.xxx] syntax is also supported.
- 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 arg_offsets
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def arg_offsets(start_offset, end_offset)
# Cuts portions out of the audio. Any number of positions may be given; audio is not sent
# to the output until the first position is reached. The effect then alternates between
# copying and discarding audio at each position.
- 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 arg_offsets
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def arg_offsets(start_offset, end_offset)
cmd_arg = ''
unless start_offset.blank?
start_offset_formatted = Time.at(start_offset.to_f).utc.strftime('%H:%M:%S.%2N')
- 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 info
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def info(source)
fail ArgumentError, "Source is not a wac file: #{source}" unless source.match(/\.wac$/)
fail Exceptions::AudioFileNotFoundError, "Could not find #{source}." unless File.exist?(source)
# WAac header format:
- 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
Avoid too many return
statements within this method. Open
return nil if hash[:description].starts_with?('max_analyze_duration')
Avoid too many return
statements within this method. Open
return nil if hash[:description].starts_with?('parser not found for')
Avoid too many return
statements within this method. Open
return nil if hash[:description].starts_with?('Application provided invalid, non monotonically increasing dts to muxer in stream')
Method modify_command
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def modify_command(source, target)
fail ArgumentError, "Source is not a png file: #{source}" unless source.match(/\.png/)
fail ArgumentError, "Target is not a png file: : #{target}" unless target.match(/\.png/)
fail Exceptions::FileNotFoundError, "Source does not exist: #{source}" unless File.exists? source
# target will probably already exist, coz we're overwriting the image
- 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 arg_colour
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def arg_colour(colour)
cmd_arg = ''
colours_available = AudioSox.colour_options.map { |k, v| "#{k} (#{v})" }.join(', ')
colour_param = ''
- 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 info
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def info(source)
fail Exceptions::FileNotFoundError, "Source does not exist: #{source}" unless File.exists? source
fail Exceptions::FileEmptyError, "Source exists, but has no content: #{source}" if File.size(source) < 1
if File.extname(source) == '.wac'
- 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_ffprobe_output
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_ffprobe_output(source, execute_msg)
# ffprobe std err contains info (separate on first equals(=))
result = {}
ffprobe_current_block_name = ''
- 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"