Showing 1,469 of 2,413 total issues
Function init_rapid_data_entry_form
has 1261 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.init_rapid_data_entry_form = function ($modal, uri) {
$(this).each(function () {
var $rde_form = $(this);
var $table = $('table#rdeTable', $rde_form);
Method configure_doc_rules
has a Cognitive Complexity of 199 (exceeds 5 allowed). Consider refactoring. Open
def configure_doc_rules
add_document_prepare_hook {|doc, record|
found_keys = Set.new
- 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 configure
has a Cognitive Complexity of 190 (exceeds 5 allowed). Consider refactoring. Open
def self.configure
with 'ead' do |*|
make :resource, {
:publish => att('audience') != 'internal',
:finding_aid_language => 'und',
- 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 TokenList
has 744 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.TokenList = function (input, url_or_data, settings) {
//
// Initialization
//
Method configure
has 722 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.configure
with 'ead' do |*|
make :resource, {
:publish => att('audience') != 'internal',
:finding_aid_language => 'und',
File rde.js
has 1290 lines of code (exceeds 250 allowed). Consider refactoring. Open
//= require jquery.event.drag-1.4.min
//= require jquery.kiketable.colsizable-1.1
//= require jquery.columnmanager.min
//= require bootstrap-multiselect
//= require linker
File marcxml_bib_base_map.rb
has 1270 lines of code (exceeds 250 allowed). Consider refactoring. Open
module MarcXMLBibBaseMap
AUTH_SUBJECT_SOURCE = {
'a'=>"lcsh",
'b'=>"LC subject headings for children's literature",
Method run
has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring. Open
def run
begin
# SETUP
@job.write_output("Resetting autogenerated slugs")
@job.write_output("================================")
- 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 BASE_RECORD_MAP
has 639 lines of code (exceeds 25 allowed). Consider refactoring. Open
def BASE_RECORD_MAP
{
:obj => :resource,
:defaults => {
:level => 'collection',
File ead3.rb
has 1212 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative 'ead'
class EAD3Serializer < EADSerializer
serializer_for :ead3
def valid_children_of_p
File 001_create_base_schema.rb
has 1182 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative 'utils'
Sequel.migration do
up do
Method serialize_control
has a Cognitive Complexity of 143 (exceeds 5 allowed). Consider refactoring. Open
def serialize_control(data, xml, fragments)
control_atts = {
repositoryencoding: "iso15511",
countryencoding: "iso3166-1",
dateencoding: "iso8601",
- 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
File eac_base_map.rb
has 1132 lines of code (exceeds 250 allowed). Consider refactoring. Open
module EACBaseMap
def EAC_BASE_MAP(opts = {:import_events => false})
import_events = opts[:import_events]
{
File indexer_common.rb
has 1095 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'ashttp'
require 'uri'
require 'json'
require 'fileutils'
require 'aspace_i18n'
Method configure_doc_rules
has 536 lines of code (exceeds 25 allowed). Consider refactoring. Open
def configure_doc_rules
add_document_prepare_hook {|doc, record|
found_keys = Set.new
Method BASE_RECORD_MAP
has a Cognitive Complexity of 132 (exceeds 5 allowed). Consider refactoring. Open
def BASE_RECORD_MAP
{
:obj => :resource,
:defaults => {
:level => 'collection',
- 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 linker
has 517 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.linker = function () {
$(this).each(function () {
var $this = $(this);
var $linkerWrapper = $this.parents('.linker-wrapper:first');
File aspace_form_helper.rb
has 1009 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'mixed_content_parser'
module AspaceFormHelper
COMBOBOX_MIN_LIMIT = 50 # if a <select> has equal or more options than this value, output a combobox
File jquery.tokeninput.js
has 927 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery Plugin: Tokenizing Autocomplete Text Entry
* Version 1.6.0
*
* Copyright (c) 2009 James Smith (http://loopj.com)
Method serialize_eadheader
has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring. Open
def serialize_eadheader(data, xml, fragments)
eadid_url = data.ead_location
if AppConfig[:arks_enabled] && data.ark_name && (current_ark = data.ark_name.fetch('current', nil))
eadid_url = current_ark
- 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"