XingFramework/xing-frontend-utils

View on GitHub

Showing 71 of 208 total issues

File xing-frontend-utils.js has 3326 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.xingFrontendUtils = 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(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
/******/     // The module cache
/******/     var installedModules = {};
/******/
Severity: Major
Found in dist/xing-frontend-utils.js - About 1 wk to fix

    Function 1 has 1831 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.xingFrontendUtils = 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(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
    /******/     // The module cache
    /******/     var installedModules = {};
    /******/
    Severity: Major
    Found in dist/xing-frontend-utils.js - About 1 wk to fix

      Function constructor has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
      Open

        constructor() {
          var defaultOptions = {
            underscore: undefined,
            camelize: undefined,
            pluralize: undefined,
      Severity: Minor
      Found in src/xing-frontend-utils/serializer.js - About 1 day 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 23 has 247 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],23:[function(require,module,exports){
      'use strict';
      
      Object.defineProperty(exports, '__esModule', {
        value: true
      Severity: Major
      Found in dist/xing-frontend-utils.js - About 1 day to fix

        Function SerializerProvider has 210 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var SerializerProvider = (function () {
          function SerializerProvider() {
            _classCallCheck(this, _SerializerProvider);
        
            var defaultOptions = {
        Severity: Major
        Found in dist/xing-frontend-utils.js - About 1 day to fix

          Function constructor has 206 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor() {
              var defaultOptions = {
                underscore: undefined,
                camelize: undefined,
                pluralize: undefined,
          Severity: Major
          Found in src/xing-frontend-utils/serializer.js - About 1 day to fix

            Function SerializerProvider has 205 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function SerializerProvider() {
                _classCallCheck(this, _SerializerProvider);
            
                var defaultOptions = {
                  underscore: undefined,
            Severity: Major
            Found in dist/xing-frontend-utils.js - About 1 day to fix

              Function $get has 182 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  this.$get = ['$injector', 'Inflector', function ($injector, Inflector) {
                    defaultOptions.underscore = defaultOptions.underscore || Inflector.underscore;
                    defaultOptions.camelize = defaultOptions.camelize || Inflector.camelize;
                    defaultOptions.pluralize = defaultOptions.pluralize || Inflector.pluralize;
              
              
              Severity: Major
              Found in src/xing-frontend-utils/serializer.js - About 7 hrs to fix

                Function $get has 180 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    this.$get = ['$injector', 'Inflector', function ($injector, Inflector) {
                      defaultOptions.underscore = defaultOptions.underscore || Inflector.underscore;
                      defaultOptions.camelize = defaultOptions.camelize || Inflector.camelize;
                      defaultOptions.pluralize = defaultOptions.pluralize || Inflector.pluralize;
                
                
                Severity: Major
                Found in dist/xing-frontend-utils.js - About 7 hrs to fix

                  Function Injector has 166 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var Injector = (function () {
                        function Injector() {
                          var appNamePrefix = arguments.length <= 0 || arguments[0] === undefined ? "" : arguments[0];
                  
                          _classCallCheck(this, Injector);
                  Severity: Major
                  Found in dist/xing-frontend-utils.js - About 6 hrs to fix

                    Function ComponentMapper has 166 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        var ComponentMapper = (function () {
                          function ComponentMapper() {
                            _classCallCheck(this, ComponentMapper);
                          }
                    
                    
                    Severity: Major
                    Found in dist/xing-frontend-utils.js - About 6 hrs to fix

                      Function 20 has 143 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{}],20:[function(require,module,exports){
                      'use strict';
                      
                      Object.defineProperty(exports, '__esModule', {
                        value: true
                      Severity: Major
                      Found in dist/xing-frontend-utils.js - About 5 hrs to fix

                        Function 24 has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"a1atscript":1,"xing-inflector":2}],24:[function(require,module,exports){
                        'use strict';
                        
                        Object.defineProperty(exports, '__esModule', {
                          value: true
                        Severity: Major
                        Found in dist/xing-frontend-utils.js - About 4 hrs to fix

                          Function 26 has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"./errorLimiter.js":22,"a1atscript":1}],26:[function(require,module,exports){
                          'use strict';
                          
                          Object.defineProperty(exports, '__esModule', {
                            value: true
                          Severity: Major
                          Found in dist/xing-frontend-utils.js - About 4 hrs to fix

                            Function Ng2DirectiveDefinitionObject has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                var Ng2DirectiveDefinitionObject = (function () {
                                  function Ng2DirectiveDefinitionObject(controller, annotation) {
                                    var template = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
                                    var bind = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];
                            
                            
                            Severity: Major
                            Found in dist/xing-frontend-utils.js - About 3 hrs to fix

                              Function 17 has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              },{}],17:[function(require,module,exports){
                              'use strict';
                              
                              require('./compiler.js');
                              
                              
                              Severity: Major
                              Found in dist/xing-frontend-utils.js - About 3 hrs to fix

                                Function InterimElementFactory has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function InterimElementFactory($q, $rootScope, $timeout, $rootElement, $animate, $xngCompiler) {
                                
                                  return function createInterimElementService(defaults) {
                                
                                    /**
                                Severity: Major
                                Found in dist/xing-frontend-utils.js - About 3 hrs to fix

                                  Function InterimElementFactory has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function InterimElementFactory($q, $rootScope, $timeout, $rootElement, $animate, $xngCompiler) {
                                  
                                    return function createInterimElementService(defaults) {
                                  
                                      /**
                                  Severity: Major
                                  Found in src/xing-frontend-utils/components/toast/interimElement.js - About 3 hrs to fix

                                    Function createInterimElementService has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      return function createInterimElementService(defaults) {
                                    
                                        /**
                                         * @ngdoc service
                                         * @name $$interimElement.$service
                                    Severity: Major
                                    Found in dist/xing-frontend-utils.js - About 3 hrs to fix

                                      Function createInterimElementService has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        return function createInterimElementService(defaults) {
                                      
                                          /**
                                           * @ngdoc service
                                           * @name $$interimElement.$service
                                      Severity: Major
                                      Found in src/xing-frontend-utils/components/toast/interimElement.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language