Showing 277 of 350 total issues
Function init_tabs
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
var init_tabs = function(){
$("ul.tabs").each(function(){
// Add init class
if($(this).hasClass('initialized'))
{
File jquery.asmselect.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Alternate Select Multiple (asmSelect) 1.0.4a beta - jQuery Plugin
* http://www.ryancramer.com/projects/asmselect/
*
* Copyright (c) 2009 by Ryan Cramer - http://www.ryancramer.com
Function modal
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.modal = function(options){
inscription_modal_remove();
options = $.extend({
position: 'center',
Method digest
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def digest(doc)
ico = name = legal_form = date_start = date_end = address = region = ''
doc.xpath("//table[@class='tabid']//tr").each do |row|
if row.xpath(".//td[1]").inner_text.match(/i(Č|č|c)o/i)
ico = row.xpath(".//td[3]").inner_text
Method parse
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def self.parse(html, year)
::Parsers::Support.save(parse_location(year), 'csv', bucketize: false)
CSV.open(::Parsers::Support.get_path(parse_location(year), bucketize: false), "wb", force_quotes: true) do |csv|
csv << 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 record_changes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def record_changes
if !self.class.table_name.match(/^(rel_|dc_)/) && !is_part_of_import
change_details = []
changed_attributes.each do |attribute, old_value|
next if attribute == "updated_at"
- 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 digest
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def digest(doc)
lawyer_table = doc.xpath("//div[@class='section']/table[@class='filter']").first
original_name = lawyer_table.xpath('./tr[1]/td[2]').inner_text.strip
name_ary = original_name.split
- 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 save
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
def save
procurement_digest = digest
# TODO refactor
case dataset_type
Function domManip
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
domManip: function( args, table, callback ) {
var results, first, fragment, parent,
value = args[0],
scripts = [];
Function CHILD
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
CHILD: function( elem, match ) {
var type = match[1],
node = elem;
switch ( type ) {
Function closest
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
closest: function( selectors, context ) {
var ret = [], i, l, cur = this[0];
if ( jQuery.isArray( selectors ) ) {
var match, selector,
Function onreadystatechange
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
// The request was aborted
if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
// Opera doesn't call onreadystatechange before this point
// so we simulate the call
Method perform
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def perform
document_ids = []
css_links = document.css('#layout-column_column-2 .portlet-body a')
any_valid_link = false
css_links.each do |css_link|
- 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 parse_address
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def parse_address(full_address)
zip = place = ''
items = full_address.split(',')
if items.size < 3
address = items[0]
- 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 digest
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def digest(doc)
employees = []
doc.xpath("//div[@id='dnn_ctr730_ModuleContent']/div[@class='TableFontItem']/table[@class='NuDetailTable']//div[@class='TableFontItem']/table[@class='NuDetailTable']/tr").each do |employee|
next if employee.xpath('.//td[1]').inner_text =~ /Meno|Deň|Pondelok|Utorok|Streda|Štvrtok|Piatok/
employee_name = employee.xpath('.//td[1]').inner_text
Function name
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
var type, i = 0, match, namespaces, preType,
selector = origSelector || this.selector,
context = origSelector ? this : jQuery( this.context );
Method sql_condition_for_operand
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sql_condition_for_operand(operand)
sql_argument = argument
operand = "(#{operand})"
case operator
Function handle
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
handle: function( event ) {
var all, handlers, namespaces, namespace_re, events,
namespace_sort = [],
args = jQuery.makeArray( arguments );
Method header_procedure_and_project_information
has 41 lines of code (exceeds 25 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
Function load
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
// Don't do a request if no elements are being requested