Showing 96 of 196 total issues
Function request_to_run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
FRNetSubModule.prototype.request_to_run = function( app_id, run_id, channel, request, callback) {
- Create a ticketCreate a ticket
Function upload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function upload(file_mngr_url, file, filename, success, error) {
- Create a ticketCreate a ticket
Method run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run( args=nil )
# First check that we have all the tools we need to run nutella
return unless all_dependencies_installed?
- Read upRead up
- Create a ticketCreate a ticket
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 function. Open
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return unless Nutella.runlist.add?(app_id, run_id, app_path)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return false
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return unless start_all_components(app_id, app_path, run_id, params)
- Create a ticketCreate a ticket
Method start_mode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.start_mode(params)
return :WITH unless params[:with].empty?
return :WO unless params[:without].empty?
:ALL if params[:with].empty? && params[:without].empty?
end
- Read upRead up
- Create a ticketCreate a ticket
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 handle_requests_on_all_runs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.handle_requests_on_all_runs(channel, callback)
# Check the passed callback has the right number of arguments
raise 'You need to pass a callback with 4 parameters (request, run_id, from) when handling requests!' if callback.parameters.length!=4
# Pad channel
padded_channel = Nutella::Net.pad_channel(channel, '+', '+')
- Read upRead up
- Create a ticketCreate a ticket
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_dependencies
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def compile_and_dependencies( script , in_progress_message, complete_message)
# If the current directory is not a nutella application, return
unless Nutella.current_app.exist?
console.warn 'The current directory is not a nutella application'
return
- Read upRead up
- Create a ticketCreate a ticket
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
Function start
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
RoomPlacesSimulator.prototype.start = function() {
// Assign initial location
var hotspots = this.hotspots;
this.beacons.forEach((function(e,i) {
e.l = hotspots[Math.floor(Math.random()*hotspots.length)];
- Read upRead up
- Create a ticketCreate a ticket
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 handle_requests_on_all_apps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.handle_requests_on_all_apps(channel, callback)
# Check the passed callback has the right number of arguments
raise 'You need to pass a callback with 3 parameters (request, run_id, from) when handling requests!' if callback.parameters.length!=3
# Pad channel
padded_channel = Nutella::Net.pad_channel(channel, '+', nil)
- Read upRead up
- Create a ticketCreate a ticket
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 exist?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def CurrentAppUtils.exist?
cur_app_dir = Dir.pwd
nutella_json_file = "#{cur_app_dir}/nutella.json"
# Check that there is a nutella.json file in the main directory of the application
if File.exist? nutella_json_file
- Read upRead up
- Create a ticketCreate a ticket
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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run(args=nil)
# If the current directory is not a nutella application, return
unless Nutella.current_app.exist?
console.warn 'The current directory is not a nutella application'
- Read upRead up
- Create a ticketCreate a ticket
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_run_id_from
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_run_id_from( args )
# Simple `nutella start/stop` (no args)
if args.nil? || args.empty?
return 'default'
end
- Read upRead up
- Create a ticketCreate a ticket
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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run(args=nil)
# If invoked with "all" it will show all the runs under this instance of nutella
if args[0]=='--all' || args[0]=='-a'
display_all_runs
- Read upRead up
- Create a ticketCreate a ticket
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"