Showing 2,413 of 2,413 total issues
File eac.rb
has 648 lines of code (exceeds 250 allowed). Consider refactoring. Open
class EACSerializer < ASpaceExport::Serializer
serializer_for :eac
def serialize(eac, _opts = {})
builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
File validations.rb
has 624 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'date'
require 'time'
require 'barcode_check'
module JSONModel::Validations
File marc_auth.rb
has 618 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MARCAuthSerializer < ASpaceExport::Serializer
serializer_for :marc_auth
def serialize(marc, _opts = {})
builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
Method _control
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
def _control(json, xml)
xml.control do
# AGENT_RECORD_IDENTIFIERS
with(xml, json['agent_record_identifiers']) do |ari|
if ari['primary_identifier'] == 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 sequel_to_jsonmodel
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
def sequel_to_jsonmodel(objs, opts = {})
jsons = super
jsons.each do |json|
case self.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 merge_record
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
def merge_record(json_in, opts)
json = json_in.clone
direct_only = opts.fetch(:direct_only) { false }
remove_ancestors = opts.fetch(:remove_ancestors) { false }
- 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
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
def parse cmdline=ARGV
vals = {}
required = {}
opt :version, "Print version and exit" if @version unless @specs[:version] || @long["version"]
- 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 255 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.configure
{
# 1. Map the cell data to schemas or handlers
'agent_role' => 'd.agent_role',
Method configure
has 251 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.configure
{
# 1. Map the cell data to schemas / handlers
# {column header} => {data address}
# or,
Function 7
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
function (require, module, exports) {
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['module', 'select'], factory);
} else if (typeof exports !== 'undefined') {
File 088_rights_management.rb
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'securerandom'
require 'json'
def backup_rights_statement_table
File relationships.rb
has 569 lines of code (exceeds 250 allowed). Consider refactoring. Open
AbstractRelationship = Class.new(Sequel::Model) do
include ObjectGraph
# Create a relationship instance between two objects with a defined set of properties.
Method _cpfdesc
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _cpfdesc(json, xml, obj)
xml.cpfDescription do
xml.identity do
# AGENT_IDENTIFIERS
with(xml, json['agent_identifiers']) do |ad|
File application_controller.rb
has 548 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'asconstants'
require 'memoryleak'
require 'search'
require 'zlib'
Function 8
has 228 lines of code (exceeds 25 allowed). Consider refactoring. Open
function (require, module, exports) {
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define([
'module',
Method serialize_dates
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
def serialize_dates(obj, xml, fragments)
add_unitdate = Proc.new do |value, context, fragments, atts={}|
context.unitdate(atts) {
sanitize_mixed_content( value, context, fragments )
}
- 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 linker.js
has 542 lines of code (exceeds 250 allowed). Consider refactoring. Open
//= require jquery.tokeninput
$(function () {
let resource_edit_path_regex = new RegExp(
'^' + APP_PATH + 'resources/\\d+/edit$'
Method convert_ead2002_markup
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
def convert_ead2002_markup(content)
apply_changes = lambda do |fn, fragment|
fragment.element_children.each do |e|
fn.(e)
if !e.element_children.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 serialize_control
has 222 lines of code (exceeds 25 allowed). Consider refactoring. Open
def serialize_control(data, xml, fragments)
control_atts = {
repositoryencoding: "iso15511",
countryencoding: "iso3166-1",
dateencoding: "iso8601",
File mixed_content.config.js
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
$(function () {
AS.mixedContentElements = {
language: {
tag: 'language',
attributes: [],