Showing 345 of 709 total issues
File fullcalendar.js
has 8211 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* FullCalendar v2.9.0
* Docs & License: http://fullcalendar.io/
* (c) 2016 Adam Shaw
*/
Function EventManager
has 850 lines of code (exceeds 25 allowed). Consider refactoring. Open
function EventManager() { // assumed to be a calendar
var t = this;
// exports
Method import
has a Cognitive Complexity of 135 (exceeds 5 allowed). Consider refactoring. Open
def import
transition_to!(:started)
num = {
manifestation_imported: 0,
item_imported: 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 index
has a Cognitive Complexity of 132 (exceeds 5 allowed). Consider refactoring. Open
def index
mode = params[:mode]
if mode == 'add'
unless current_user.try(:has_role?, 'Librarian')
access_denied
- 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 fetch
has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring. Open
def fetch(row, options = {edit_mode: 'create'})
manifestation = nil
item = nil
if options[:edit_mode] == 'update'
- 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 to_dcndl
has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring. Open
def to_dcndl
xml = Builder::XmlMarkup.new
xml.tag! "rdf:RDF",
"xmlns:rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"xmlns:dcterms" => "http://purl.org/dc/terms/",
- 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 Calendar_constructor
has 484 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Calendar_constructor(element, overrides) {
var t = this;
// Exports
File resource_import_file.rb
has 773 lines of code (exceeds 250 allowed). Consider refactoring. Open
class ResourceImportFile < ApplicationRecord
include Statesman::Adapters::ActiveRecordQueries[
transition_class: ResourceImportFileTransition,
initial_state: ResourceImportFileStateMachine.initial_state
]
File manifestations_controller.rb
has 700 lines of code (exceeds 250 allowed). Consider refactoring. Open
class ManifestationsController < ApplicationController
before_action :set_manifestation, only: [:show, :edit, :update, :destroy]
before_action :check_policy, only: [:index, :new, :create]
before_action :authenticate_user!, only: :edit
before_action :get_agent, :get_manifestation, except: [:create, :update, :destroy]
Method index
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
def index
query = params[:query].to_s.strip
per_page = Item.default_per_page
@count = {}
if user_signed_in?
- 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 manifestation.rb
has 632 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Manifestation < ApplicationRecord
include EnjuCirculation::EnjuManifestation
include EnjuSubject::EnjuManifestation
include EnjuNdl::EnjuManifestation
include EnjuNii::EnjuManifestation
Method rdf_statement
has 279 lines of code (exceeds 25 allowed). Consider refactoring. Open
def rdf_statement(manifestation)
nextl = RDF::Vocabulary.new('https://next-l.jp/vocab/')
subject = RDF::URI.new(manifestation_url(manifestation))
graph = RDF::Graph.new
Function Header
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Header(calendar) {
var t = this;
// exports
t.render = render;
Method index
has 199 lines of code (exceeds 25 allowed). Consider refactoring. Open
def index
mode = params[:mode]
if mode == 'add'
unless current_user.try(:has_role?, 'Librarian')
access_denied
Method to_dcndl
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_dcndl
xml = Builder::XmlMarkup.new
xml.tag! "rdf:RDF",
"xmlns:rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"xmlns:dcterms" => "http://purl.org/dc/terms/",
File enju_manifestation.rb
has 487 lines of code (exceeds 250 allowed). Consider refactoring. Open
module EnjuLoc
module EnjuManifestation
extend ActiveSupport::Concern
included do
Method fetch
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
def fetch(row, options = {edit_mode: 'create'})
manifestation = nil
item = nil
if options[:edit_mode] == 'update'
Method import_record
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def import_record(doc)
iss_itemno = URI.parse(doc.at('//dcndl:BibAdminResource[@rdf:about]').values.first).path.split('/').last
ndl_bib_id_record =NdlBibIdRecord.find_by(body: iss_itemno)
return ndl_bib_id_record.manifestation if ndl_bib_id_record
- 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 import
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
def import
transition_to!(:started)
num = {
manifestation_imported: 0,
item_imported: 0,
Method create_additional_attributes
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
def create_additional_attributes(doc, manifestation)
title = get_title(doc)
creators = get_creators(doc).uniq
subjects = get_subjects(doc).uniq
classifications = get_classifications(doc).uniq
- 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"