Showing 122 of 200 total issues
Function 1
has 609 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Select = f()}})(function(){var define,module,exports;return (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){
(function (global){
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
File picker.date.js
has 852 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Date picker for pickadate.js v3.5.0
* http://amsul.github.io/pickadate.js/date.htm
*/
Function PickerConstructor
has 394 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
// If there’s no element, return the picker constructor.
if ( !ELEMENT ) return PickerConstructor
File select.js
has 657 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Select = f()}})(function(){var define,module,exports;return (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){
(function (global){
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
Function nodes
has 266 lines of code (exceeds 25 allowed). Consider refactoring. Open
DatePicker.prototype.nodes = function( isOpen ) {
var
calendar = this,
settings = calendar.settings,
File picker.js
has 539 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* pickadate.js v3.5.0, 2014/04/13
* By Amsul, http://amsul.ca
* Hosted on http://amsul.github.io/pickadate.js
* Licensed under MIT
Function init
has 223 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function(options) {
var defaults = {
menuWidth: 240,
edge: 'left',
closeOnClick: false
Function init
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function(options) {
var defaults = {
indicators: true,
height: 400,
transition: 500,
Function materialbox
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.materialbox = function () {
return this.each(function() {
if ($(this).hasClass('initialized')) {
Function tooltip
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.tooltip = function (options) {
var timeout = null,
counter = null,
started = false,
counterInterval = null,
Function material_select
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.material_select = function (callback) {
$(this).each(function(){
$select = $(this);
if ( $select.hasClass('browser-default')) {
Function dropdown
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.dropdown = function (option) {
var defaults = {
inDuration: 300,
outDuration: 225,
constrain_width: true, // Constrains width of dropdown to the activator
Method checkout
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def checkout(bill_attrs = {}, package_attrs: {})
check_cart!
return { orders: [], bill: nil } unless Settings.open_for_orders
return { orders: [], bill: nil } if cart_items.blank?
- 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 1
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutosizeInput = f()}})(function(){var define,module,exports;return (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){
(function (global){
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
`` has 31 functions (exceeds 20 allowed). Consider refactoring. Open
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d) {
//alert(jQuery.easing.default);
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
File forms.js
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function ($) {
$(document).ready(function() {
// Function to update labels of text fields
Materialize.updateTextFields = function() {
Function toast
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Materialize.toast = function (message, displayLength, className, completeCallback) {
className = className || "";
var container = document.getElementById('toast-container');
- 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 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function render() {
var selectClass = classes('Select', this.props.className, {
'is-multi': this.props.multi,
'is-searchable': this.props.searchable,
'is-open': this.state.isOpen,
Function toast
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Materialize.toast = function (message, displayLength, className, completeCallback) {
className = className || "";
var container = document.getElementById('toast-container');
Function handleInputKeyDown
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
handleInputKeyDown: function(e) {
autoPreview = this.props.autoPreview;
// console.log(e.key);
// console.log(e.keyCode);
switch (e.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"