Showing 82 of 181 total issues
Function 6
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
},{}],6:[function(require,module,exports){
'use strict';
var cls = require('./class');
var dom = require('./dom');
- 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 schedules.js
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
(function() {
var Schedule = {
_default_schedule: {
Function 20
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){
'use strict';
var instances = require('./instances');
Function 6
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],6:[function(require,module,exports){
'use strict';
var cls = require('./class');
var dom = require('./dom');
Function 3
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],3:[function(require,module,exports){
'use strict';
var DOM = {};
Function exports
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (element) {
var i = instances.get(element);
i.containerWidth = element.clientWidth;
i.containerHeight = element.clientHeight;
Function exports
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (element, axis, value) {
if (typeof element === 'undefined') {
throw 'You must provide an element to the update-scroll function';
}
Method call
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def call(env)
# Get an easier to work with request object
req = Rack::Request.new(env)
# Authenticate API requests using API keys
- 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 Command
has 85 lines of code (exceeds 50 allowed). Consider refactoring. Open
func Command(command string, output chan string) (int, error) {
// Get the hostnasme of the server we're running on
hostname, err := os.Hostname()
if err != nil {
Function Instance
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Instance(element) {
var i = this;
i.settings = _.clone(defaultSettings);
i.containerWidth = null;
Function 4
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],4:[function(require,module,exports){
'use strict';
var EventElement = function (element) {
this.element = element;
Function 15
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
},{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){
'use strict';
var _ = require('../../lib/helper');
var instances = require('../instances');
- 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 _updateGui
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
_updateGui: function(parsed_schedule) {
this._checkInit();
var self = this;
if (parsed_schedule.type === 'special') {
`` has 21 functions (exceeds 20 allowed). Consider refactoring. Open
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
var ps = require('../main');
var psInstances = require('../plugin/instances');
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 e
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
- 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 start!
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def start!
# Activate the monitor
@active = true
# Connect to the 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
Method add_db_cli_command
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.add_db_cli_command(cli)
cli.command :db do |c|
c.syntax = 'minicron db [setup|migrate|version]'
c.description = 'Sets up the minicron database schema.'
Method add_server_cli_command
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.add_server_cli_command(cli)
cli.command :server do |c|
c.syntax = 'minicron server [start|stop|restart|status]'
c.description = 'Controls the minicron server.'
c.option '--host STRING', String, "The host for the server to listen on. Default: #{Minicron.config['server']['host']}"
Function _onUpdate
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onUpdate: function($this) {
this._checkInit();
// The 'id' of the event which we use to defer the type
// it's either the href with the # stripped off if it's a