IntegerMan/angularIF

View on GitHub

Showing 1,098 of 1,099 total issues

Function AutoComplete has 400 lines of code (exceeds 25 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: Major
Found in src/assets/primeng/components/autocomplete/autocomplete.js - About 2 days to fix

    Function Dialog has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
    Open

    var Dialog = (function () {
        function Dialog(el, domHandler, renderer, zone) {
            this.el = el;
            this.domHandler = domHandler;
            this.renderer = renderer;
    Severity: Minor
    Found in src/assets/primeng/components/dialog/dialog.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 PickList has 378 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var PickList = (function () {
        function PickList(el, domHandler, objectUtils) {
            this.el = el;
            this.domHandler = domHandler;
            this.objectUtils = objectUtils;
    Severity: Major
    Found in src/assets/primeng/components/picklist/picklist.js - About 1 day to fix

      Function ColorPicker has 366 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var ColorPicker = (function () {
          function ColorPicker(el, domHandler, renderer, cd) {
              this.el = el;
              this.domHandler = domHandler;
              this.renderer = renderer;
      Severity: Major
      Found in src/assets/primeng/components/colorpicker/colorpicker.js - About 1 day to fix

        Function Tooltip has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring.
        Open

        var Tooltip = (function () {
            function Tooltip(el, domHandler, renderer) {
                this.el = el;
                this.domHandler = domHandler;
                this.renderer = renderer;
        Severity: Minor
        Found in src/assets/primeng/components/tooltip/tooltip.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 ObjectUtils has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring.
        Open

        var ObjectUtils = (function () {
            function ObjectUtils() {
            }
            ObjectUtils.prototype.equals = function (obj1, obj2, field) {
                if (field)
        Severity: Minor
        Found in src/assets/primeng/components/utils/objectutils.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 DomHandler has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
        Open

        var DomHandler = (function () {
            function DomHandler() {
                this.calculatedScrollbarWidth = null;
            }
            DomHandler.prototype.addClass = function (element, className) {
        Severity: Minor
        Found in src/assets/primeng/components/dom/domhandler.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 Dropdown has 354 lines of code (exceeds 25 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: Major
        Found in src/assets/primeng/components/dropdown/dropdown.js - About 1 day to fix

          Function Tree has 346 lines of code (exceeds 25 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: Major
          Found in src/assets/primeng/components/tree/tree.js - About 1 day to fix

            Function ColorPicker has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
            Open

            var ColorPicker = (function () {
                function ColorPicker(el, domHandler, renderer, cd) {
                    this.el = el;
                    this.domHandler = domHandler;
                    this.renderer = renderer;
            Severity: Minor
            Found in src/assets/primeng/components/colorpicker/colorpicker.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 FileUpload has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
            Open

            var FileUpload = (function () {
                function FileUpload(domHandler, sanitizer, zone) {
                    this.domHandler = domHandler;
                    this.sanitizer = sanitizer;
                    this.zone = zone;
            Severity: Minor
            Found in src/assets/primeng/components/fileupload/fileupload.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 DomHandler has 329 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var DomHandler = (function () {
                function DomHandler() {
                    this.calculatedScrollbarWidth = null;
                }
                DomHandler.prototype.addClass = function (element, className) {
            Severity: Major
            Found in src/assets/primeng/components/dom/domhandler.js - About 1 day to fix

              File tree.js has 708 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/tree/tree.js - About 1 day to fix

                Function Dialog has 321 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var Dialog = (function () {
                    function Dialog(el, domHandler, renderer, zone) {
                        this.el = el;
                        this.domHandler = domHandler;
                        this.renderer = renderer;
                Severity: Major
                Found in src/assets/primeng/components/dialog/dialog.js - About 1 day to fix

                  Function Slider has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring.
                  Open

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

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

                    static attemptPutInside(context: CommandContext, subject: WorldEntity, prep: CommandToken): CommandResult {
                  
                      const container = prep.modifies;
                  
                      if (!container || container.classification === TokenClassification.Verb) {
                  Severity: Major
                  Found in src/app/engine/verbs/put-handler.ts and 1 other location - About 1 day to fix
                  src/app/engine/verbs/hang-handler.ts on lines 43..71

                  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 264.

                  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

                    static attemptHang(context: CommandContext, subject: WorldEntity, prep: CommandToken): CommandResult {
                  
                      const suspender = prep.modifies;
                  
                      if (!suspender || suspender.classification === TokenClassification.Verb) {
                  Severity: Major
                  Found in src/app/engine/verbs/hang-handler.ts and 1 other location - About 1 day to fix
                  src/app/engine/verbs/put-handler.ts on lines 53..81

                  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 264.

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

                  var ConfirmDialog = (function () {
                      function ConfirmDialog(el, domHandler, renderer, confirmationService, zone) {
                          var _this = this;
                          this.el = el;
                          this.domHandler = domHandler;
                  Severity: Minor
                  Found in src/assets/primeng/components/confirmdialog/confirmdialog.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 MultiSelect has 277 lines of code (exceeds 25 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: Major
                  Found in src/assets/primeng/components/multiselect/multiselect.js - About 1 day to fix

                    Function Schedule has 269 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var Schedule = (function () {
                        function Schedule(el, differs) {
                            this.el = el;
                            this.aspectRatio = 1.35;
                            this.defaultView = 'month';
                    Severity: Major
                    Found in src/assets/primeng/components/schedule/schedule.js - About 1 day to fix
                      Severity
                      Category
                      Status
                      Source
                      Language