Showing 43 of 89 total issues
File bootstrap.js
has 1548 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Bootstrap v3.3.4 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
Function DataNetChainFactory
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
var DataNetChainFactory = function(repositoryName, controller) {
this.repositoryName = repositoryName;
this.controller = controller;
this.urlBase = '/datanet/{repoName}/';
this.fieldValues = {};
- 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 Rimrock
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Rimrock = function () {
var rimrockProxy = '/rimrock';
var monitoredJobs = {};
Function PlgApp
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
var PlgApp = function () {
var baseLocation = '/';
var rimrockJs = 'plgapp/rimrock.js';
var plgdataJs = 'plgapp/plgdata.js';
var datanetJs = 'plgapp/datanet.js';
- 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 Rimrock
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
var Rimrock = function () {
var rimrockProxy = '/rimrock';
var monitoredJobs = {};
- 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 DataNetChainFactory
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
var DataNetChainFactory = function(repositoryName, controller) {
this.repositoryName = repositoryName;
this.controller = controller;
this.urlBase = '/datanet/{repoName}/';
this.fieldValues = {};
Function PlgApp
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PlgApp = function () {
var baseLocation = '/';
var rimrockJs = 'plgapp/rimrock.js';
var plgdataJs = 'plgapp/plgdata.js';
var datanetJs = 'plgapp/datanet.js';
Function DataNet
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
var DataNet = function() {
var factory = null;
this.repository = function(name) {
factory = new DataNetChainFactory(name, this);
- 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 PLGData
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
var PLGData = function () {
var plgdataProxy = '/plgdata';
var downloadPrefix = plgdataProxy + '/download';
var uploadPrefix = plgdataProxy + '/upload';
- 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 DataNet
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
var DataNet = function() {
var factory = null;
this.repository = function(name) {
factory = new DataNetChainFactory(name, this);
Function PLGData
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PLGData = function () {
var plgdataProxy = '/plgdata';
var downloadPrefix = plgdataProxy + '/download';
var uploadPrefix = plgdataProxy + '/upload';
Function then
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.then = function(successCallback, errorCallback) {
switch(this.action) {
case undefined:
case null:
errorCallback('None of the action methods were called (action methods: create(), get(), delete(), update(), search())');
Method nav_link
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def nav_link(options = {}, &block)
if path = options.delete(:path)
if path.respond_to?(:each)
c = path.map { |p| p.split('#').first }
a = path.map { |p| p.split('#').last }
- 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 validate_each
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def validate_each(record, attribute, value)
raise(ArgumentError, 'A CarrierWave::Uploader::Base object was expected') unless value.kind_of? CarrierWave::Uploader::Base
value = (options[:tokenizer] || DEFAULT_TOKENIZER).call(value) if value.kind_of?(String)
- 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 show
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Tooltip.prototype.show = function () {
var e = $.Event('show.bs.' + this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
Function slide
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
Function show
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
Function monitorJobs
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var monitorJobs = function () {
var delayCheck = function () {
if (Object.keys(monitoredJobs).length > 0) {
setTimeout(monitorJobs, 5000);
}
Function backdrop
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
Function activate
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)