Showing 4,422 of 4,422 total issues
Function data
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;
Method url_check
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
def url_check
return if setup_done_response
# validate
if params[:url].blank? || params[:url] !~ %r{^(http|https)://.+?$}
Method link_account
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.link_account(_request_token, params)
# fail if request_token.params[:oauth_token] != params[:state]
external_credential = ExternalCredential.find_by(name: 'facebook')
raise Exceptions::UnprocessableEntity, __('No Facebook app configured!') if !external_credential
Function useObjectAttributeFormData
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useObjectAttributeFormData = (
objectAttributes: Map<string, ObjectManagerFrontendAttribute>,
values: FormValues,
) => {
const internalObjectAttributeValues: Record<string, FormFieldValue> = {}
Function debugLink
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const debugLink = new ApolloLink((operation, forward) => {
if (log.getLevel() < log.levels.DEBUG) return forward(operation)
const requestContext = operation.getContext()
Function handleError
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected handleError(error: ApolloError): void {
const options = this.handlerOptions
let triggerNotification = options.errorShowNotification
Function schema
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
definition.schema = (extensions) => {
let sectionSchemaExtension:
| FormKitSchemaCondition
| Partial<FormKitSchemaNode>
Method perform
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def perform(model)
model = model.safe_constantize
return if model.blank?
assets = {}
- 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 filter_matches?
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def self.filter_matches?(mail, filter)
min_one_rule_exists = false
filter[:match].each do |key, meta|
- 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 attachments_for_search_index_attribute_lookup
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def attachments_for_search_index_attribute_lookup
# list ignored file extensions
attachments_ignore = Setting.get('es_attachment_ignore') || [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe' ]
# max attachment size
- 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 changed?
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def changed?(object:, current_changes:, previous_changes: {})
changed = false
previous_changes ||= {}
current_changes.each do |attribute, value|
next if !object.attributes.key?(attribute.to_s)
- 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 assets
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def assets(data)
app_model_trigger = Trigger.to_app_model
data[ app_model_trigger ] ||= {}
- 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 assets
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def assets(data)
app_model = self.class.to_app_model
if !data[ app_model ]
- 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 ticket_set_last_owner_update_time
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def ticket_set_last_owner_update_time
# return if we run import mode
return true if Setting.get('import_mode')
# check if owner, state or group has changed
- 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 selectors
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def selectors(selectors, options = {})
limit = options[:limit] || 10
current_user = options[:current_user]
access = options[:access] || 'full'
raise 'no selectors given' if !selectors
- 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 params_all
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def params_all
profile = nil
if !params[:profiles] && !params[:profile_id]
raise Exceptions::UnprocessableEntity, __("Required parameter 'profile' is missing.")
end
- 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 by_organization
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def by_organization
year = params[:year] || Time.zone.now.year
month = params[:month] || Time.zone.now.month
start_period = Time.zone.parse("#{year}-#{month}-01")
- 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 process
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def process
state.provide(:ews_folder_id_path_map) do
ids = ews_folder_ids
ids ||= []
- 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 register_webhook
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def self.register_webhook(params)
request_account_to_link(params, false)
raise Exceptions::UnprocessableEntity, __("The required parameter 'consumer_key' is missing.") if params[:consumer_key].blank?
raise Exceptions::UnprocessableEntity, __("The required parameter 'consumer_secret' is missing.") if params[:consumer_secret].blank?
- 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 history
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def self.history(data)
history_object = History::Object.lookup(name: data[:object])
query, bind_params, tables = Ticket.selector2sql(data[:selector])
- 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"