Showing 2,455 of 5,951 total issues
Function validate
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
validate: function(attrs) {
if (!attrs) return;
if (attrs.type === "file") {
// Number of files
- 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 exports
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (CodeMirror) {
var Pos = CodeMirror.Pos;
function arrayContains (arr, item) {
return arr.indexOf(item) !== -1;
- 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 validate
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
validate: function (attrs) {
if (!attrs) return;
if (attrs.type === 'file') {
// Number of files
- 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 FileTrie
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
var FileTrie = function () {
var trie = {
root: {}
};
- 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 create
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def create
account_creator = CartoDB::UserAccountCreator.new(Carto::UserCreation::CREATED_VIA_ORG_SIGNUP).
with_organization(@organization, viewer: invitation.try(:viewer)).
with_invitation_token(params[:invitation_token])
- 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 36 (exceeds 5 allowed). Consider refactoring. Open
def process(input_data, add_headers = true, additional_fields = {})
results = []
if add_headers
results_row = INDIVIDUAL_FIELDS.map { |field|
- 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_user
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def import_user
begin
if @options[:metadata]
check_user_exists_redis
check_user_exists_postgres
- 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 visualizations_export_service_2.rb
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'json'
require_dependency 'carto/export/layer_exporter'
require_dependency 'carto/export/data_import_exporter'
# Version History
File show-hint.code-mirror.js
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
/* eslint-disable */
module.exports = function (CodeMirror) {
File events.rb
has 389 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'carto/tracking/services/pubsub_tracker'
require_dependency 'carto/tracking/formats/internal'
require_dependency 'carto/tracking/services/pubsub'
require_dependency 'carto/tracking/services/segment'
Class ConnectionManager
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
class ConnectionManager
class ConnectionNotFoundError < CartoError
def initialize(message)
Function draggableOverlay
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.draggableOverlay = function(opt) {
var self = this;
var $rule = null;
var $ruleH = null;
Function generate_categories
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
generate_categories: function(props, table, metadata, property_name) {
property_name = property_name || props['property'];
function _normalizeValue(v) {
return v.replace(/\n/g,'\\n')
- 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 a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def initialize(options)
default_options = { metadata: true, data: true, split_user_schemas: true, path: '', set_banner: true }
@options = default_options.merge(options)
@start = Time.now
- 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 text.js
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
cdb.admin.overlays.Text = cdb.geo.ui.Text.extend({
className: "text overlay snap",
template_name: 'table/views/overlays/text',
File collection.rb
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'set'
require_relative './member'
require_relative './overlays'
require_relative '../../../services/data-repository/structures/collection'
exports
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = CoreView.extend({
events: {
'click .js-addIcon': '_onAddIconClicked',
'click .js-selectAllIcons': '_onSelectAllIconsClicked',
Class UserTable
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class UserTable < Sequel::Model
extend Forwardable
INTERFACE = %w{
pk
Class SessionsController
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class SessionsController < ApplicationController
include ActionView::Helpers::DateHelper
include LoginHelper
include Carto::EmailCleaner
Class Ogr2ogr
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class Ogr2ogr
ENCODING = 'UTF-8'
SCHEMA = 'cdb_importer'
PG_COPY_OPTION = { 'PG_USE_COPY' => 'YES' }.freeze