Method compile_and_start_run
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.compile_and_start_run(
repo_path:, env_variables: {}, container_labels: {}, max_lines: 0, platform: nil,
disable_proxy: false, memory: nil, &block
)
memory = default_memory_limit if memory.nil?
Method attach_to_run
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def self.attach_to_run(container, since = nil, &block)
params = { stdout: true, stderr: true, follow: true, timestamps: true }
params[:since] = since.to_f if since
container.streaming_logs(params) do |s, line|
timestamp = Time.zone.parse(line[0..29])
- 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 compile_and_start_run
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def self.compile_and_start_run(
repo_path:, env_variables: {}, container_labels: {}, max_lines: 0, platform: nil,
disable_proxy: false, memory: nil, &block
)
memory = default_memory_limit if memory.nil?
- 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 copy_config_to_directory
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.copy_config_to_directory(source, dest, copy_config)
Dir.entries(source).each do |entry|
next if [".", ".."].include?(entry)
unless copy_config ^ ALL_CONFIG_FILENAMES.include?(entry)
- 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"