Showing 2,455 of 5,951 total issues
Class VisualizationsController
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Admin::VisualizationsController < Admin::AdminController
include CartoDB, VisualizationsControllerHelper
include Carto::FrameOptionsHelper
include Carto::UUIDHelper
File vis.js
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* this model is created to manage the visualization order. In order to simplify API
* the order is changed using a double linked list instead of a order attribute.
*/
Function task
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.task = function (grunt) {
return {
vendor: {
expand: true,
cwd: 'vendor/assets/stylesheets/',
File style-view.js
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var _ = require('underscore');
var Backbone = require('backbone');
var CoreView = require('backbone/core-view');
var PanelWithOptionsView = require('builder/components/view-options/panel-with-options-view');
var StyleContentView = require('./style-content-view');
Function validate
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
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
Method update_row!
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
Open
def update_row!(row_id, raw_attributes)
retries = 0
rows_updated = 0
owner.in_database do |user_database|
- 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 tokenBase
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function tokenBase(stream, state) {
var ch = stream.next();
if (ch == "@") {stream.eatWhile(/[\w\-]/); return ret("meta", stream.current());}
else if (ch == "/" && stream.eat("*")) {
File header.js
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Common header for vis view ( table | derived )
*
* - It needs a visualization model, config and user data.
File pages_controller.rb
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'active_support/inflector'
require 'carto/api/vizjson3_presenter'
require_relative '../../models/table'
require_relative '../../models/visualization/member'
CartoDBTableData
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
Open
cdb.admin.CartoDBTableData = cdb.ui.common.TableData.extend({
_ADDED_ROW_TEXT: 'Row added correctly',
_ADDING_ROW_TEXT: 'Adding a new row',
_GEOMETRY_UPDATED: 'Table geometry updated',
File twitter.rb
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'json'
require_relative '../util/csv_file_dumper'
require_relative '../../../../twitter-search/twitter-search'
Method data
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def data(options = {})
db_size_in_bytes = self.db_size_in_bytes
data = {
id: id,
File legend_editor.js
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Widget for the Share Dialog */
cdb.admin.mod.LegendWidget = cdb.core.View.extend({
File box.rb
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require_relative '../../../../../lib/carto/http/client'
module CartoDB
module Datasources
module Url
File export-image-pane.js
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var $ = require('jquery');
var Backbone = require('backbone');
var CoreView = require('backbone/core-view');
var FooterView = require('./footer/footer-view');
var ExportImageFormView = require('./export-image-form-view.js');
File data-view.js
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var _ = require('underscore');
var Backbone = require('backbone');
var CoreView = require('backbone/core-view');
var PanelWithOptionsView = require('builder/components/view-options/panel-with-options-view');
var ScrollView = require('builder/components/scroll/scroll-view');
Class User
has 41 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Carto::User < ActiveRecord::Base
include DataServicesMetricsHelper
include Carto::AuthTokenGenerator
include Carto::UserCommons
include CartodbCentralSynchronizable
File connector.js
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import 'whatwg-fetch';
import { getBaseURL } from 'new-dashboard/utils/base-url';
/*
DEV CREDENTIALS:
File cartodb_layer.js
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
cdb.admin.CartoDBLayer = cdb.geo.CartoDBLayer.extend({
MAX_HISTORY: 5,
MAX_HISTORY_QUERY: 5,
MAX_HISTORY_TILE_STYLE: 5,
File Gruntfile.js
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var _ = require('underscore');
var timer = require('grunt-timer');
var semver = require('semver');
var jasmineCfg = require('./lib/build/tasks/jasmine.js');
var execSync = require('child_process').execSync;