Showing 1,155 of 1,155 total issues
File jquery.simplecalendarjp.js
has 1751 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
*-------------------------------------
* redmine風のシンプルカレンダープラグイン
* copyright DQNEO 2011
* http://dqn.sakusakutto.jp/
File manifestation.rb
has 1693 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'csv'
engines = []
engines << EnjuTrunkFrbr::Engine if defined? EnjuTrunkFrbr
engines << EnjuTrunkCirculation::Engine if defined? EnjuTrunkCirculation
engines << EnjuTrunkOrder::Engine if defined? EnjuTrunkOrder
File manifestations_controller.rb
has 1611 lines of code (exceeds 250 allowed). Consider refactoring. Open
class ManifestationsController < ApplicationController
authorize_function
add_breadcrumb "I18n.t('breadcrumb.search_manifestations')", 'manifestations_path', :only => [:index] #, :unless => proc{params}
# add_breadcrumb "I18n.t('breadcrumb.search_manifestations')", 'manifestations_path(params)', :only => [:index], :if => proc{params}
add_breadcrumb "I18n.t('page.showing', :model => I18n.t('activerecord.models.manifestation'))", 'manifestation_path(params[:id])', :only => [:show]
File nacsis_cat.rb
has 1452 lines of code (exceeds 250 allowed). Consider refactoring. Open
class NacsisCat
include ActiveModel::Conversion
extend ActiveModel::Naming
attr_accessor :record
Method output_detail
has a Cognitive Complexity of 177 (exceeds 5 allowed). Consider refactoring. Open
def self.output_detail(wbstyles, sheet, data, conditions, cols, remove = nil)
default_style = wbstyles.add_style :font_name => Setting.item_statistics_print_excelx.fontname
if remove.blank?
book_sym = "book".to_sym
- 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 output_csv
has a Cognitive Complexity of 172 (exceeds 5 allowed). Consider refactoring. Open
def output_csv
approvals = Approval.scoped
# approval_identifier
unless params[:approval_identifier].blank?
approvals = approvals.where(["approvals.approval_identifier like ?", params[:approval_identifier] + "%"])
- 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 item.rb
has 1307 lines of code (exceeds 250 allowed). Consider refactoring. Open
require EnjuTrunkFrbr::Engine.root.join('app', 'models', 'item')
require EnjuTrunkCirculation::Engine.root.join('app', 'models', 'item') if Setting.operation
require EnjuTrunkOrder::Engine.root.join('app', 'models', 'item') if defined? EnjuTrunkOrder
class Item < ActiveRecord::Base
extend ActiveRecordExtension
File import_book.rb
has 1148 lines of code (exceeds 250 allowed). Consider refactoring. Open
module EnjuTrunk
module ImportBook
SERIES_REQUIRE_COLUMNS = %w(
series.original_title
series.series_statement_identifier
Method make_query_string_and_hl_pattern
has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring. Open
def make_query_string_and_hl_pattern
qwords = []
highlight = []
#
- 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 initialize
has 543 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(user, ip_address = nil)
# TODO
initialize_circulation(user, ip_address) if Setting.operation
initialize_event(user, ip_address) if defined?(EnjuEvent)
initialize_subject(user, ip_address) if defined?(EnjuSubject)
Method make_form_boolean
has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring. Open
def make_form_boolean(string, system_configuration)
['true', 'false'].each do |state|
string << "<input type=radio
name=system_configurations[#{ system_configuration.id }]
value=#{state} "
- 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 output_reminder_postal_card
has a Cognitive Complexity of 118 (exceeds 5 allowed). Consider refactoring. Open
def self.output_reminder_postal_card(file, reminder_lists, user, current_user)
logger.info "create_file=> #{file}"
report_path = EnjuTrunk.report_path
report = ThinReports::Report.create do
- 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 excel_worksheet_value
has a Cognitive Complexity of 113 (exceeds 5 allowed). Consider refactoring. Open
def excel_worksheet_value(ws_type, ws_col, sep_flg, ccount, item = nil)
if ws_type == 'root'
if root_manifestation = series_statement.try(:root_manifestation)
root_manifestation.excel_worksheet_value('book', ws_col, sep_flg, ccount, item)
else
- 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 user.rb
has 864 lines of code (exceeds 250 allowed). Consider refactoring. Open
require EnjuTrunkOrder::Engine.root.join('app', 'models', 'user') if defined? EnjuTrunkOrder
class User < ActiveRecord::Base
self.extend UsersHelper
# Include default devise modules. Others available are:
# :token_authenticatable, :lockable and :timeoutable
Method update_or_create_manifestation
has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring. Open
def update_or_create_manifestation(datas, sheet, manifestation_type, manifestation, not_set_serial_number, series_statement, error_msgs, external_resource, is_root = false)
if is_root
# root_manifestationのための処理を行う
field = 'root'
return nil unless series_statement
- 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 export_removing_list
has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring. Open
def self.export_removing_list(out_dir, file_type = nil)
raise "invalid parameter: no path" if out_dir.nil? || out_dir.length < 1
tsv_file = out_dir + "removing_list.tsv"
pdf_file = out_dir + "removing_list.pdf"
logger.info "output removing_list tsv: #{tsv_file} pdf: #{pdf_file}"
- 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 output_columns
has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring. Open
def self.output_columns(wbstyles, sheet, conditions, cols)
merge_style = wbstyles.add_style :font_name => Setting.item_statistics_print_excelx.fontname, :alignment => {:horizontal => :center, :vertical => :center}
if cols.length > 0
# 1行目
if conditions.aggregation_first.present?
- 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 92 (exceeds 5 allowed). Consider refactoring. Open
def index
set_reserve_user
search_opts = make_index_plan # 検索動作の方針を抽出する
@seconds = Benchmark.realtime do
- 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 advanced_search_condition_summary
has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring. Open
def advanced_search_condition_summary(opts = {})
return "(#{I18n.t('page.new_resource')})" if params[:mode] == 'recent'
return "(#{params[:solr_query]})" if params[:solr_query].present?
summary_ary = []
- 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 set_manifestations_data
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
def self.set_manifestations_data(column, manifestation_ids)
logger.debug "begin export manifestations"
transaction do
where(:id => manifestation_ids).
includes(
- 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"