bronycub/sugarcub

View on GitHub

Showing 1,331 of 3,238 total issues

File ajax.js has 505 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define( [
    "./core",
    "./var/document",
    "./var/rnothtmlwhite",
    "./ajax/var/location",
Severity: Major
Found in core/static/vendor/jquery/src/ajax.js - About 1 day to fix

    File moment.d.ts has 501 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, strict?: boolean): moment.Moment;
    declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, language?: string, strict?: boolean): moment.Moment;
    
    declare namespace moment {
      type RelativeTimeKey = 's' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'M' | 'MM' | 'y' | 'yy';
    Severity: Major
    Found in core/static/vendor/moment/moment.d.ts - About 1 day to fix

      Function chili has 196 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.fn.chili = function( options ) {
          var book = $.extend( {}, ChiliBook, options || {} );
      
          function cook( ingredients, recipe ) {
      
      
      Severity: Major
      Found in core/static/vendor/jquery-expander/demo/chili-1.8.js - About 7 hrs to fix

        Function translate has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

        function translate(number, withoutSuffix, key, isFuture) {
            var result = number + ' ';
            switch (key) {
                case 's':  // a few seconds / in a few seconds / a few seconds ago
                    return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
        Severity: Minor
        Found in core/static/vendor/moment/src/locale/cs.js - About 7 hrs to fix

        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 translate has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

        function translate(number, withoutSuffix, key, isFuture) {
            var result = number + ' ';
            switch (key) {
                case 's':  // a few seconds / in a few seconds / a few seconds ago
                    return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
        Severity: Minor
        Found in core/static/vendor/moment/src/locale/sk.js - About 7 hrs to fix

        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 handleStrictParse has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
        Open

        function handleStrictParse(weekdayName, format, strict) {
            var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
            if (!this._weekdaysParse) {
                this._weekdaysParse = [];
                this._shortWeekdaysParse = [];
        Severity: Minor
        Found in core/static/vendor/moment/src/lib/units/day-of-week.js - About 7 hrs to fix

        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 jsDump has 180 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        QUnit.jsDump = (function() {
            function quote( str ) {
                return '"' + str.toString().replace(/"/g, '\\"') + '"';
            }
            function literal( o ) {
        Severity: Major
        Found in core/static/vendor/bootstrap-datepicker/tests/assets/qunit.js - About 7 hrs to fix

          Function exports has 179 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (grunt) {
              'use strict';
              grunt.initConfig({
                  pkg: grunt.file.readJSON('package.json'),
                  uglify: {
          Severity: Major
          Found in core/static/vendor/eonasdan-bootstrap-datetimepicker/Gruntfile.js - About 7 hrs to fix

            Function equiv has 178 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            QUnit.equiv = (function() {
            
                // Call the o related callback with the given arguments.
                function bindCallbacks( o, callbacks, args ) {
                    var prop = QUnit.objectType( o );
            Severity: Major
            Found in core/static/vendor/jquery-expander/test/qunit/qunit.1.19.0.js - About 7 hrs to fix

              Function Deferred has 176 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Deferred: function( func ) {
                      var tuples = [
              
                              // action, add listener, callbacks,
                              // ... .then handlers, argument index, [final state]
              Severity: Major
              Found in core/static/vendor/jquery/dist/jquery.js - About 7 hrs to fix

                Function Deferred has 176 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Deferred: function( func ) {
                        var tuples = [
                
                                // action, add listener, callbacks,
                                // ... .then handlers, argument index, [final state]
                Severity: Major
                Found in core/static/vendor/jquery/dist/jquery.slim.js - About 7 hrs to fix

                  Function Deferred has 176 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Deferred: function( func ) {
                          var tuples = [
                  
                                  // action, add listener, callbacks,
                                  // ... .then handlers, argument index, [final state]
                  Severity: Major
                  Found in core/static/vendor/jquery/src/deferred.js - About 7 hrs to fix

                    Function init has 163 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          init: function() {
                            this.each(function() {
                              var i, l, tmp, newChar, summTagless, summOpens, summCloses,
                                  lastCloseTag, detailText, detailTagless, html, expand;
                              var $thisDetails, $readMore;
                    Severity: Major
                    Found in core/static/vendor/jquery-expander/jquery.expander.js - About 6 hrs to fix

                      Function setOptions has 161 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  datetimepicker.setOptions = function (_options) {
                                      var highlightedDates = {};
                      
                                      options = $.extend(true, {}, options, _options);
                      
                      
                      Severity: Major
                      Found in core/static/vendor/datetimepicker/build/jquery.datetimepicker.full.js - About 6 hrs to fix

                        Function setOptions has 161 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    datetimepicker.setOptions = function (_options) {
                                        var highlightedDates = {};
                        
                                        options = $.extend(true, {}, options, _options);
                        
                        
                        Severity: Major
                        Found in core/static/vendor/datetimepicker/jquery.datetimepicker.js - About 6 hrs to fix

                          File php-date-formatter.js has 431 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*!
                           * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2017
                           * @version 1.3.4
                           *
                           * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format.
                          Severity: Minor
                          Found in core/static/vendor/php-date-formatter/js/php-date-formatter.js - About 6 hrs to fix

                            File Gruntfile.js has 431 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*!
                             * Bootstrap's Gruntfile
                             * http://getbootstrap.com
                             * Copyright 2013-2016 Twitter, Inc.
                             * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
                            Severity: Minor
                            Found in core/static/vendor/bootstrap/Gruntfile.js - About 6 hrs to fix

                              Function checkOverflow has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export default function checkOverflow (m) {
                                  var overflow;
                                  var a = m._a;
                              
                                  if (a && getParsingFlags(m).overflow === -2) {
                              Severity: Minor
                              Found in core/static/vendor/moment/src/lib/create/check-overflow.js - About 6 hrs to fix

                              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 fill has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      fill: function(){
                                          var d = new Date(this.viewDate),
                                              year = d.getUTCFullYear(),
                                              month = d.getUTCMonth(),
                                              startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,
                              Severity: Major
                              Found in core/static/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js - About 5 hrs to fix

                                Function fill has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        fill: function(){
                                            var d = new Date(this.viewDate),
                                                year = d.getUTCFullYear(),
                                                month = d.getUTCMonth(),
                                                startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language