Showing 5,951 of 5,951 total issues
Function saveBasemap
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
saveBasemap: function () {
var self = this;
this.set('contentPane', 'addingBasemap');
- 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 render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
render: function () {
var self = this;
var value = this.value || [];
// Create main element
- 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 _getTabPanes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_getTabPanes: function () {
var tabPaneTabs = [];
var attrs = this.options.editorAttrs;
if (attrs && attrs.hidePanes) {
if (!_.contains(attrs.hidePanes, FillConstants.Panes.FIXED)) tabPaneTabs.push(this._buildFixedPane());
- 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 getDefaultAutoStyle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getDefaultAutoStyle: function (type, columnName) {
var defaultWidgetCategories = 10;
var defaultWidgetRampSize = 7;
var widgetRamp = _.first(
_.compact(
- 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 _generateFixedContentView
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_generateFixedContentView: function () {
var editorAttrs = this.options.editorAttrs;
this._fixedView = new SizeFixedView({
model: this._sizeModel,
min: editorAttrs && editorAttrs.min || FillConstants.Size.DefaultInput100.MIN,
- 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 _getHistogramFromBounds
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_getHistogramFromBounds: function (bins) {
var bounds = this.stats.histogram_bounds;
bounds = bounds.sort(function (a, b) { return a - b; });
var min = bounds[0];
var max = bounds[bounds.length - 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 _genDescription
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_genDescription: function () {
if (this.options.fileAttrs && this.options.fileAttrs.description) {
var descriptionOpts = this.options.fileAttrs.description;
var descriptionKeyValue = '';
var descriptionStr = '';
- 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 initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
initialize: function (opts) {
if (!opts.userModel) throw new Error('userModel is required');
if (!opts.modalModel) throw new Error('modalModel is required');
if (!opts.analysisOptionsCollection) throw new Error('analysisOptionsCollection is required');
if (!opts.analysisType) throw new Error('analysisType is required');
- 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 setOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
setOptions: function (editor, options) {
var validators = [];
if (options.schema && options.schema.validators) {
validators = validators.concat(options.schema.validators);
- 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 initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
initialize: function (opts) {
if (!opts.userModel) throw new Error('userModel is required');
if (!opts.modalModel) throw new Error('modalModel is required');
if (!opts.analysisOptionsCollection) throw new Error('analysisOptionsCollection is required');
if (!opts.analysisOptions) throw new Error('analysisOptions is required');
- 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 getSourceNamesForAnalysisType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getSourceNamesForAnalysisType: function (type) {
if (!SOURCE_NAMES_MAP[type]) {
var sourceNames = [];
var params = this.paramsForType(type);
- 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 _checkStatus
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_checkStatus: function () {
if (!this.get('id') && !this._uploadModel.isValid()) {
this.trigger('change:upload');
return;
}
- 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 _scrollMagic
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_scrollMagic: function (ev) {
var actual_scroll_position = { x: $(window).scrollLeft(), y: $(window).scrollTop() };
if (this.scroll_position.x != actual_scroll_position.x) { // eslint-disable-line eqeqeq
this.scroll_position.x = actual_scroll_position.x;
- 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 _onResetGroupUsers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_onResetGroupUsers: function () {
// just this.render() is not enough, because each sub-view re-renders its view on state changes,
// Instead, only re-render when hitting the edge-cases after a rest
const lastRendered = this.model.get('lastRendered');
const totalGroupUsersCount = this._groupUsers.totalCount();
- 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 _onKeyup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_onKeyup: function () {
const modifiedQuotaInBytes = Math.max(Math.floor(this.$('.js-assignedSize').val() * 1048576), 1048576);
const assignedPer = (modifiedQuotaInBytes * 100) / this.model.organization.get('available_quota_for_user');
const errorMessage = '<p class="FormAccount-rowInfoText FormAccount-rowInfoText--error js-userQuotaError">Invalid quota, insert a valid one.</p>';
- 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 _initViews
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_initViews: function () {
const organizationUsersEmail = this._organizationUsers.pluck('email');
this.$('.js-tagsList').tagit({
allowSpaces: true,
- 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 _importDataset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_importDataset: function (mdl) {
var tableIdsArray = _.clone(this.get('tableIdsArray'));
if (mdl.get('type') === 'remote') {
var d = {
- 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 fetchGeoreferenceStatus
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
fetchGeoreferenceStatus: function () {
var dfd = $.Deferred();
var username = (this.options && this.options.user_data) ? this.options.user_data.username
: (window.user_data ? window.user_data.username : window.user_name);
var api_key = (this.options && this.options.user_data) ? this.options.user_data.api_key
- 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 _onWidgetAutoStyleColorChanged
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_onWidgetAutoStyleColorChanged: function (model) {
var isAutoStyleApplied = model.isAutoStyle();
var autoStyleInfo = model.getAutoStyle();
var layerId = model.layerModel.id;
var layerDefModel = this._layerDefinitionsCollection.findWhere({ id: layerId });
- 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 render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
render: function () {
var sample = this._visModel.get('sample');
var subscription = this._visModel.get('subscription');
var entity = sample || subscription || {};
var entityLabel = (subscription || (sample && sample.entity_subscribed))
- 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"