jaumard/ngx-dashboard

View on GitHub

Showing 38 of 75 total issues

Function 129 has a Cognitive Complexity of 191 (exceeds 5 allowed). Consider refactoring.
Open

/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
Severity: Minor
Found in demo/demoDist/main.bundle.js - About 3 days 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 129 has 458 lines of code (exceeds 25 allowed). Consider refactoring.
Open

/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
Severity: Major
Found in demo/demoDist/main.bundle.js - About 2 days to fix

    Function DashboardComponent has 418 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var DashboardComponent = (function () {
        function DashboardComponent(_componentFactoryResolver, _ngEl, _renderer) {
            this._componentFactoryResolver = _componentFactoryResolver;
            this._ngEl = _ngEl;
            this._renderer = _renderer;
    Severity: Major
    Found in demo/demoDist/main.bundle.js - About 2 days to fix

      Function 319 has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring.
      Open

      /***/ (function(module, exports) {
      
      /*
          MIT License http://www.opensource.org/licenses/mit-license.php
          Author Tobias Koppers @sokra
      Severity: Minor
      Found in demo/demoDist/styles.bundle.js - About 2 days 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

      File main.bundle.js has 790 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      webpackJsonp([0,3],{
      
      /***/ 129:
      /***/ (function(module, exports, __webpack_require__) {
      
      
      Severity: Major
      Found in demo/demoDist/main.bundle.js - About 1 day to fix

        Function 319 has 209 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        /***/ (function(module, exports) {
        
        /*
            MIT License http://www.opensource.org/licenses/mit-license.php
            Author Tobias Koppers @sokra
        Severity: Major
        Found in demo/demoDist/styles.bundle.js - About 1 day to fix

          File dashboard.component.ts has 457 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import {
            AfterViewInit,
            Component,
            ComponentFactoryResolver,
            ComponentRef,
          Severity: Minor
          Found in src/components/dashboard/dashboard.component.ts - About 7 hrs to fix

            Function 81 has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
            Open

            /***/ (function(module, __webpack_exports__, __webpack_require__) {
            
            "use strict";
            /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(9);
            /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dist__ = __webpack_require__(77);
            Severity: Minor
            Found in demo/demoDist/main.bundle.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 80 has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
            Open

            /***/ (function(module, __webpack_exports__, __webpack_require__) {
            
            "use strict";
            /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(9);
            /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dist__ = __webpack_require__(77);
            Severity: Minor
            Found in demo/demoDist/main.bundle.js - About 5 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 53 has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

            /***/ (function(module, exports) {
            
            /*
                MIT License http://www.opensource.org/licenses/mit-license.php
                Author Tobias Koppers @sokra
            Severity: Minor
            Found in demo/demoDist/styles.bundle.js - About 4 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

            DashboardComponent has 33 functions (exceeds 20 allowed). Consider refactoring.
            Open

            @Component({
              selector: 'dashboard',
              template: '<div #target><ng-content></ng-content></div>',
              host: {
                '(window:resize)': '_onResize($event)',
            Severity: Minor
            Found in src/components/dashboard/dashboard.component.ts - About 4 hrs to fix

              Function 137 has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

              /***/ (function(module, __webpack_exports__, __webpack_require__) {
              
              "use strict";
              /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(43);
              /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(9);
              Severity: Minor
              Found in demo/demoDist/main.bundle.js - About 4 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 75 has 101 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              /***/ (function(module, exports, __webpack_require__) {
              
              "use strict";
              
              Object.defineProperty(exports, "__esModule", { value: true });
              Severity: Major
              Found in demo/demoDist/main.bundle.js - About 4 hrs to fix

                Function _positionWidget has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                Open

                  private _positionWidget(lines: number[], items: ComponentRef<WidgetComponent>[], index: number, column: number, row: number): void {
                    if (!items[index]) {
                      let remainingHeight = 0;
                      for (let i = 0; i < lines.length; i++) {
                        if (remainingHeight < lines[i]) {
                Severity: Minor
                Found in src/components/dashboard/dashboard.component.ts - About 3 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 WidgetComponent has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var WidgetComponent = (function () {
                    function WidgetComponent(_ngEl, _renderer) {
                        this._ngEl = _ngEl;
                        this._renderer = _renderer;
                        this.size = [1, 1];
                Severity: Major
                Found in demo/demoDist/main.bundle.js - About 3 hrs to fix

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

                  /***/ (function(module, __webpack_exports__, __webpack_require__) {
                  
                  "use strict";
                  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(9);
                  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dist__ = __webpack_require__(77);
                  Severity: Major
                  Found in demo/demoDist/main.bundle.js - About 2 hrs to fix

                    File styles.bundle.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    webpackJsonp([1,3],{
                    
                    /***/ 132:
                    /***/ (function(module, exports, __webpack_require__) {
                    
                    
                    Severity: Minor
                    Found in demo/demoDist/styles.bundle.js - About 2 hrs to fix

                      Function _positionWidget has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          DashboardComponent.prototype._positionWidget = function (lines, items, index, column, row) {
                              if (!items[index]) {
                                  var remainingHeight = 0;
                                  for (var i = 0; i < lines.length; i++) {
                                      if (remainingHeight < lines[i]) {
                      Severity: Major
                      Found in demo/demoDist/main.bundle.js - About 2 hrs to fix

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

                        /***/ (function(module, __webpack_exports__, __webpack_require__) {
                        
                        "use strict";
                        /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(9);
                        /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dist__ = __webpack_require__(77);
                        Severity: Major
                        Found in demo/demoDist/main.bundle.js - About 2 hrs to fix

                          Function _positionWidget has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            private _positionWidget(lines: number[], items: ComponentRef<WidgetComponent>[], index: number, column: number, row: number): void {
                              if (!items[index]) {
                                let remainingHeight = 0;
                                for (let i = 0; i < lines.length; i++) {
                                  if (remainingHeight < lines[i]) {
                          Severity: Minor
                          Found in src/components/dashboard/dashboard.component.ts - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language