Showing 95 of 107 total issues
Method end_element
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def end_element(name)
@path.pop
case name
when ROOT
when LOGIC
Method do_or_set_failed
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def do_or_set_failed(updating_klass = nil, &block)
raise ArgumentError.new('No block given.') unless block_given?
begin
yield
Method list
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def list
typeIri = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
labelIri = 'http://www.w3.org/2000/01/rdf-schema#label'
commentIri = 'http://www.w3.org/2000/01/rdf-schema#comment'
definedIri = 'http://www.w3.org/2000/01/rdf-schema#isDefinedBy'
- 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 list
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def list
typeIri = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
labelIri = 'http://www.w3.org/2000/01/rdf-schema#label'
commentIri = 'http://www.w3.org/2000/01/rdf-schema#comment'
definedIri = 'http://www.w3.org/2000/01/rdf-schema#isDefinedBy'
- 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 characters
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def characters(text)
case @path.last
when SYMBOL
@current_symbol['text'] << text if @current_symbol
when TEXT
- 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 state_message
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def state_message
msg = [state]
if last_error
lines = last_error.split("\n")
if (ind=lines.index("*** Error:")) and (out = lines[ind+1]).present?
- 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 commit_file
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def commit_file(userinfo, file_contents, target_path, message, &block)
# throw exception if path is below a file
if points_through_file?(target_path)
raise GitRepository::PathBelowFileException
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 characters
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def characters(text)
case @path.last
when SYMBOL
@current_symbol['text'] << text if @current_symbol
when TEXT
- 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 matches?
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def matches?(request, path = nil)
path ||= Journey::Router::Utils.
unescape_uri(request.original_fullpath)
# retrieves the hierarchy and member portions of loc/id's
hierarchy_member = path.split('?', 2).first.split('///', 2).first
- 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 exec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def exec
if Settings.data_root.join("maintenance.txt").exist?
STDERR.puts "System in maintenance mode. Please try again later."
exit 1
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 call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def call
Semaphore.exclusively(lock_key, expiration: MUTEX_EXPIRATION) do
unless finished
transaction do
preprocess unless other_finished_sine_axiom_selections.any?
- 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 commits
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def commits(start_oid: nil, stop_oid: nil, path: nil, limit: nil, offset: 0, walk_order: nil, &block)
return [] if @repo.empty?
start_oid ||= head_oid
offset = 0 if offset < 0
stop_oid = nil if stop_oid =~ /\A0+\z/
- 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 start_element
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def start_element(name, attributes)
@path << name
case name
when ROOT
callback(:root, Hash[*[attributes]])
- 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 exec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def exec
# If its push over ssh
# we need to check user persmission per branch first
if ssh?
if api.allowed?('git-receive-pack', @repo_name, @key_id, @branch_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 start_element
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def start_element(name, attributes)
order = :start
@path << name
case name
when ROOT
- 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 active_navigation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def active_navigation(controller)
alternatives = [controller.to_s, controller.to_s.gsub('_', '/')]
if params[:repository_id]
if params[:ontology_id]
'active' if controller == :ontologies
- 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 wrapped_button
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def wrapped_button(*args, &block)
template.content_tag :div, :class => "form-group" do
template.content_tag :div, class: 'col-lg-offset-2 col-lg-10' do
options = args.extract_options!
loading = self.object.new_record? ? I18n.t('simple_form.creating') : I18n.t('simple_form.updating')
- 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 initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(opts)
@repository = Repository.find_by_path(opts[:repository_id])
@commit_id = compute_ref(repository, opts[:ref])
@oid = commit_id[:oid] unless repository.empty?
- 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 choose!
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def choose!(try_again: true)
raise NoRegisteredHetsInstanceError.new unless any?
instance = exclusively { choose_set_instance }
if instance && instance.send(:check_up_state)
instance
- 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 entry_info_list_rugged
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def entry_info_list_rugged(rugged_commit, path)
entries = []
changing_rugged_commit = get_commit_of_last_change(path, rugged_commit)
previous_rugged_commit = 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"