Showing 28 of 840 total issues
Method add_group_to_project
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.add_group_to_project(project, group_path, dir_path, directory_name, group_is_logical)
Method ask_file_with_path
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ask_file_with_path(pattern, message_file_name)
project_files = Dir[pattern]
count = project_files.count
default_message = "The path to a #{message_file_name}:"
if count == 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 check_all_required_dependencies_has_in_podfile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.check_all_required_dependencies_has_in_podfile(dependencies, podfile_path)
return if !dependencies || dependencies.count == 0 || !podfile_path
dependencies_names = []
Pod::Podfile.from_file(Pathname.new(podfile_path)).dependencies.each do |dependency|
- 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 all_nil_mandatory_fields_for_target_type
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def all_nil_mandatory_fields_for_target_type(target_type, code_module)
fields = []
variable_name = "#{target_type}_targets"
- 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 install_template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def install_template(template_declaration)
template_name = template_declaration.name
puts("Installing #{template_name}...")
repo_url = template_declaration.git
- 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 check_all_required_dependencies_has_in_cartfile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.check_all_required_dependencies_has_in_cartfile(dependencies, cartfile_path)
return if !dependencies || dependencies.count == 0 || !cartfile_path
cartfile_string = File.read(cartfile_path)
- 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 install_template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def install_template(template_declaration)
template_name = template_declaration.name
puts("Installing #{template_name}...")
template_name = template_declaration.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"
Further reading
Method gen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def gen(module_name, template_name)
does_rambafile_exist = Dir[RAMBAFILE_NAME].count > 0
unless does_rambafile_exist
puts('Rambafile not found! Run `generamba setup` in the working directory instead!'.red)
- 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"