IntegerMan/angularIF

View on GitHub

Showing 1,098 of 1,099 total issues

Function DataTable has a Cognitive Complexity of 897 (exceeds 5 allowed). Consider refactoring.
Open

var DataTable = (function () {
    function DataTable(el, domHandler, differs, renderer, changeDetector, objectUtils, zone) {
        this.el = el;
        this.domHandler = domHandler;
        this.differs = differs;
Severity: Minor
Found in src/assets/primeng/components/datatable/datatable.js - About 2 wks 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 Calendar has a Cognitive Complexity of 550 (exceeds 5 allowed). Consider refactoring.
Open

var Calendar = (function () {
    function Calendar(el, domHandler, renderer, cd) {
        this.el = el;
        this.domHandler = domHandler;
        this.renderer = renderer;
Severity: Minor
Found in src/assets/primeng/components/calendar/calendar.js - About 1 wk 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 DataTable has 1599 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var DataTable = (function () {
    function DataTable(el, domHandler, differs, renderer, changeDetector, objectUtils, zone) {
        this.el = el;
        this.domHandler = domHandler;
        this.differs = differs;
Severity: Major
Found in src/assets/primeng/components/datatable/datatable.js - About 1 wk to fix

    File datatable.js has 2364 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    "use strict";
    var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    Severity: Major
    Found in src/assets/primeng/components/datatable/datatable.js - About 6 days to fix

      Function Calendar has 1077 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var Calendar = (function () {
          function Calendar(el, domHandler, renderer, cd) {
              this.el = el;
              this.domHandler = domHandler;
              this.renderer = renderer;
      Severity: Major
      Found in src/assets/primeng/components/calendar/calendar.js - About 5 days to fix

        Function Tree has a Cognitive Complexity of 260 (exceeds 5 allowed). Consider refactoring.
        Open

        var Tree = (function () {
            function Tree(dragDropService) {
                this.dragDropService = dragDropService;
                this.selectionChange = new core_1.EventEmitter();
                this.onNodeSelect = new core_1.EventEmitter();
        Severity: Minor
        Found in src/assets/primeng/components/tree/tree.js - About 5 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 InputMask has a Cognitive Complexity of 219 (exceeds 5 allowed). Consider refactoring.
        Open

        var InputMask = (function () {
            function InputMask(el, domHandler) {
                this.el = el;
                this.domHandler = domHandler;
                this.type = 'text';
        Severity: Minor
        Found in src/assets/primeng/components/inputmask/inputmask.js - About 4 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 PickList has a Cognitive Complexity of 211 (exceeds 5 allowed). Consider refactoring.
        Open

        var PickList = (function () {
            function PickList(el, domHandler, objectUtils) {
                this.el = el;
                this.domHandler = domHandler;
                this.objectUtils = objectUtils;
        Severity: Minor
        Found in src/assets/primeng/components/picklist/picklist.js - About 4 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 AutoComplete has a Cognitive Complexity of 192 (exceeds 5 allowed). Consider refactoring.
        Open

        var AutoComplete = (function () {
            function AutoComplete(el, domHandler, renderer, objectUtils, cd, differs) {
                this.el = el;
                this.domHandler = domHandler;
                this.renderer = renderer;
        Severity: Minor
        Found in src/assets/primeng/components/autocomplete/autocomplete.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

        File calendar.js has 1362 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        "use strict";
        var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
            var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
            if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
            else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        Severity: Major
        Found in src/assets/primeng/components/calendar/calendar.js - About 3 days to fix

          Function TreeTable has a Cognitive Complexity of 163 (exceeds 5 allowed). Consider refactoring.
          Open

          var TreeTable = (function () {
              function TreeTable(el, domHandler, changeDetector, renderer) {
                  this.el = el;
                  this.domHandler = domHandler;
                  this.changeDetector = changeDetector;
          Severity: Minor
          Found in src/assets/primeng/components/treetable/treetable.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

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                          if (metaSelection) {
                              var metaKey = (event.metaKey || event.ctrlKey);
                              if (selected && metaKey) {
                                  if (this.isSingleSelectionMode()) {
                                      this.selectionChange.emit(null);
          Severity: Major
          Found in src/assets/primeng/components/tree/tree.js and 1 other location - About 3 days to fix
          src/assets/primeng/components/treetable/treetable.js on lines 167..213

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 555.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                          if (metaSelection) {
                              var metaKey = (event.metaKey || event.ctrlKey);
                              if (selected && metaKey) {
                                  if (this.isSingleSelectionMode()) {
                                      this.selectionChange.emit(null);
          Severity: Major
          Found in src/assets/primeng/components/treetable/treetable.js and 1 other location - About 3 days to fix
          src/assets/primeng/components/tree/tree.js on lines 331..377

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 555.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function Dropdown has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring.
          Open

          var Dropdown = (function () {
              function Dropdown(el, domHandler, renderer, cd, objectUtils, zone) {
                  this.el = el;
                  this.domHandler = domHandler;
                  this.renderer = renderer;
          Severity: Minor
          Found in src/assets/primeng/components/dropdown/dropdown.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

          Function Listbox has a Cognitive Complexity of 121 (exceeds 5 allowed). Consider refactoring.
          Open

          var Listbox = (function () {
              function Listbox(el, domHandler, objectUtils, cd) {
                  this.el = el;
                  this.domHandler = domHandler;
                  this.objectUtils = objectUtils;
          Severity: Minor
          Found in src/assets/primeng/components/listbox/listbox.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

          Function MultiSelect has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring.
          Open

          var MultiSelect = (function () {
              function MultiSelect(el, domHandler, renderer, differs, objectUtils, cd) {
                  this.el = el;
                  this.domHandler = domHandler;
                  this.renderer = renderer;
          Severity: Minor
          Found in src/assets/primeng/components/multiselect/multiselect.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

          Function OrderList has a Cognitive Complexity of 104 (exceeds 5 allowed). Consider refactoring.
          Open

          var OrderList = (function () {
              function OrderList(el, domHandler, objectUtils) {
                  this.el = el;
                  this.domHandler = domHandler;
                  this.objectUtils = objectUtils;
          Severity: Minor
          Found in src/assets/primeng/components/orderlist/orderlist.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

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

          var InputMask = (function () {
              function InputMask(el, domHandler) {
                  this.el = el;
                  this.domHandler = domHandler;
                  this.type = 'text';
          Severity: Major
          Found in src/assets/primeng/components/inputmask/inputmask.js - About 2 days to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                Tree.prototype.propagateUp = function (node, select) {
                    if (node.children && node.children.length) {
                        var selectedCount = 0;
                        var childPartialSelected = false;
                        for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
            Severity: Major
            Found in src/assets/primeng/components/tree/tree.js and 1 other location - About 2 days to fix
            src/assets/primeng/components/treetable/treetable.js on lines 256..290

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 366.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                TreeTable.prototype.propagateSelectionUp = function (node, select) {
                    if (node.children && node.children.length) {
                        var selectedCount = 0;
                        var childPartialSelected = false;
                        for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
            Severity: Major
            Found in src/assets/primeng/components/treetable/treetable.js and 1 other location - About 2 days to fix
            src/assets/primeng/components/tree/tree.js on lines 422..456

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 366.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language