Showing 453 of 612 total issues
Method add_link
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def add_link(params)
first_entity = params[:from]
second_entity = params[:to]
- 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 export
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def export(evidence, opts)
# expand the sytles in the dest dir
FileTask.expand_styles do |name, content|
yield 'stream', name, {content: content}
end
- 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 update
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def update
require_auth_level :admin, :sys, :tech, :view
mongoid_query do
user = User.find(@params['_id'])
- 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 feed
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def feed(point)
unless @point_buffer.empty?
# all the points in the buffer intersect the new point
- 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 get_app_info
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_app_info(file)
# Read info from original package
fd = File.open(file, "rb")
raise "Invalid input file" unless fd
Method run
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def run(options)
return analyze(options[:analyze]) if options[:analyze]
$local_address = options[:ip]
- 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 update_rule
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def update_rule
require_auth_level :tech, :sys
mongoid_query do
- 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 periodic_check
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def periodic_check
begin
# periodically check for license file
load_license(true)
- 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 do_backup
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def self.do_backup(now, backup, save_status = true)
trace :info, "Performing backup [#{backup.name}]..."
Audit.log :actor => '<system>', :action => 'backup.start', :desc => "Performing backup #{backup.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 status
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
def status
require_auth_level :server, :tech
demo = (@params['demo'] == 'true') ? true : false
level = @params['level'].to_sym
File db_layer.rb
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'mongoid'
require 'rbconfig'
require 'socket'
require 'rcs-common/trace'
require 'rcs-common/fixnum'
Method process_http_request
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def process_http_request
#trace :debug, "[#{@peer}] Incoming HTTP Connection"
size = (@http_post_content) ? @http_post_content.bytesize : 0
# get it again since if the connection is kept-alive we need a fresh timing for each
- 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 destroy_callback
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def destroy_callback
unless self.data['_grid'].nil?
RCS::DB::GridFS.delete(self.data['_grid'], agent.path.last.to_s) rescue nil
end
- 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 request
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def request(path, body = {}, opts = {})
trace :info, "Request #{path} on archive node #{address}"
headers = {'x_sync_signature' => signature, 'Connection' => 'keep-alive'}
- 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 prepare_response
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def prepare_response(connection, request)
@request = request
@connection = connection
@response = EM::DelegatedHttpResponse.new @connection
- 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 flow
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def self.flow(params)
start_time = Time.now # for debugging
# aggregate all the entities by their handles' handle
# so if 2 entities share the same handle you'll get {'foo.bar@gmail.com' => ['entity1_id', 'entity2_id']}
- 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 get
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def get(params)
trace :debug, "Positioning: resolving #{params.inspect}"
request = params.dup
- 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 run
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(options)
if options[:reset]
reset_pass options
return 0
Class Evidence
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class Evidence
include Mongoid::Document
include RCS::TargetScoped
include RCS::DB::Proximity
include RCS::Tracer
File entity.rb
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../link_manager'
module RCS
module DB