Showing 277 of 350 total issues
Method customer_information
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
def customer_information
customer_information_hash = {}
case document_format
when :format1
Consider simplifying this complex logical expression. Open
if ( event.pageX == null && event.clientX != null ) {
var doc = document.documentElement,
body = document.body;
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
Method suppliers_information
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
def suppliers_information(document)
suppliers = []
case document_type(document)
when :standard
Method header_procedure_and_project_information
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def header_procedure_and_project_information
header_procedure_and_project_information_hash = {}
main_element = document.xpath("//div[@class='oznamenie']")
case document_format
- 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
Function Sizzle
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origContext = context;
File vvo_extraction.rb
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'fileutils'
module Etl
class VvoExtraction < Etl::Extraction
include Etl::Shared::VvoIncludes
Method show
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show
@dataset_description = DatasetDescription.find(params[:id])
@field_descriptions = @dataset_description.visible_field_descriptions.includes(:data_format)
@dataset_class = @dataset_description.dataset_model
@title = @dataset_description.title
Method page_entries_info_custom
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def page_entries_info_custom(collection, options = {})
model = options[:model]
model = collection.first.class unless model or collection.empty?
model ||= 'entry'
model_key = if model.respond_to? :model_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
Function remove
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
remove: function( elem, types, handler, pos ) {
// don't do events on text and comment nodes
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
Method additional_information
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
def additional_information
additional_information_hash = {}
case document_format
when :format1
Function _mouseDrag
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseDrag: function(event) {
//Compute the helpers position
this.position = this._generatePosition(event);
this.positionAbs = this._convertPositionTo("absolute");
Method define_index_for_dataset
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def self.define_index_for_dataset(dataset_description)
reference = dataset_description.dataset_model.name.underscore
ThinkingSphinx::Index.define(reference, with: :active_record) do
indexes :_record_id
indexes :record_status
- 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 perform
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def perform
document_ids = {
notice: [],
performance: []
}
- 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
Function add
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function( elem, types, handler, data ) {
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
Method contract_information
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def contract_information(document)
contract_information_hash = {}
case document_type(document)
when :standard
- 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
Class DatasetDescription
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class DatasetDescription < ActiveRecord::Base
has_many :similar_datasets,
source: :dataset_description_source,
foreign_key: :similar_source_id
Method foundation
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def foundation
registration_number = identification_number = name = address = objective = ''
date_start = date_end = date_liquidation = date_registration = ''
assets_value = assets_currency = 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
Consider simplifying this complex logical expression. Open
if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0], box;
if ( options ) {
Method create_predicates_from_tokens
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_predicates_from_tokens(tokens)
# puts "==> predicate from tokens #{tokens}"
tokens.each { |token|
# puts "--- token '#{token}'"
Function trigger
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem /*, bubbling */ ) {
// Event object or event type
var type = event.type || event,
bubbling = arguments[3];