Showing 544 of 841 total issues
Function defaultPrefilter
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultPrefilter( elem, props, opts ) {
/* jshint validthis: true */
var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
anim = this,
orig = {},
Function draw
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
draw: function() {
var me = this;
var opts = me.options;
var labelOpts = opts.labels;
var globalDefault = Chart.defaults.global,
Function 34
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],34:[function(require,module,exports){
'use strict';
module.exports = function(Chart) {
Function drawPoint
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
helpers.drawPoint = function(ctx, pointStyle, radius, x, y) {
var type, edgeLength, xOffset, yOffset, height, size;
if (typeof pointStyle === 'object') {
type = pointStyle.toString();
Function 21
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],21:[function(require,module,exports){
/* global window: false */
'use strict';
module.exports = function(Chart) {
Function determineDataLimits
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
determineDataLimits: function() {
var me = this;
var opts = me.options;
var tickOpts = opts.ticks;
var chart = me.chart;
Method run_command
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
def run_command(statement)
@statement = statement
data_source = params[:data_source]
process_vars(@statement, data_source)
@only_chart = params[:only_chart]
- 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 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(Chart) {
var helpers = Chart.helpers;
/**
Function start
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start: function start (tag, attrs, unary) {
// check namespace.
// inherit parent ns if there is one
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
Function exports
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(Chart) {
var helpers = Chart.helpers;
Chart.defaults.global.animation = {
Function renderTimePicker
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderTimePicker: function(side) {
var html, selected, minDate, maxDate = this.maxDate;
if (this.dateLimit && (!this.maxDate || this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)))
Function refreshOptions
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
refreshOptions: function(triggerDropdown) {
var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
var $active, $active_before, $create;
if (typeof triggerDropdown === 'undefined') {
Function _onDragOver
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onDragOver: function (/**Event*/evt) {
var el = this.el,
target,
dragRect,
revert,
Function 16
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],16:[function(require,module,exports){
'use strict';
module.exports = function(Chart) {
Function determineDataLimits
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
determineDataLimits: function() {
var me = this;
var opts = me.options;
var chart = me.chart;
var data = chart.data;
Function buildTicks
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildTicks: function() {
var me = this;
me.ctx.save();
var tickFontSize = helpers.getValueOrDefault(me.options.ticks.fontSize, Chart.defaults.global.defaultFontSize);
Function 43
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"41":41}],43:[function(require,module,exports){
'use strict';
module.exports = function(Chart) {
Function 31
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],31:[function(require,module,exports){
'use strict';
module.exports = function(Chart) {
Function trigger
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem, onlyHandlers ) {
var handle, ontype, cur,
bubbleType, special, tmp, i,
eventPath = [ elem || document ],
type = hasOwn.call( event, "type" ) ? event.type : event,
Function exports
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(Chart) {
var helpers = Chart.helpers;
Chart.defaults.bubble = {