IHTSDO/snomed-interaction-components

View on GitHub

Showing 6,870 of 6,870 total issues

Function Handlebars has a Cognitive Complexity of 941 (exceeds 5 allowed). Consider refactoring.
Open

var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
  "use strict";
  var __exports__;
Severity: Minor
Found in external-libs/handlebars-v1.3.0.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 conceptDetails has 2327 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function conceptDetails(divElement, conceptId, options) {

    if (typeof componentsRegistry == "undefined") {
        componentsRegistry = [];
    }
Severity: Major
Found in js/conceptDetailsPlugin.js - About 1 wk to fix

    Function runInContext has 2277 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function runInContext(context) {
        // Avoid issues with some ES3 environments that attempt to use values, named
        // after built-in constructors like `Object`, for the creation of literals.
        // ES5 clears this up by stating that literals must use built-in constructors.
        // See http://es5.github.io/#x11.1.5.
    Severity: Major
    Found in external-libs/lodash.js - About 1 wk to fix

      Function Handlebars has 2057 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var Handlebars = (function() {
      // handlebars/safe-string.js
      var __module4__ = (function() {
        "use strict";
        var __exports__;
      Severity: Major
      Found in external-libs/handlebars-v1.3.0.js - About 1 wk to fix

        Function updateCanvas has 1530 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            this.updateCanvas = function() {
                //        $("#members-" + panel.divElement.id).html("");
                $("#home-children-cant-" + panel.divElement.id).html("");
                $('.more-fields-button').popover('hide');
                if (conceptRequested == panel.conceptId) {
        Severity: Major
        Found in js/conceptDetailsPlugin.js - About 1 wk to fix

          File lodash.js has 2517 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * @license
           * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
           * Build: `lodash modern -o ./dist/lodash.js`
           * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
          Severity: Major
          Found in external-libs/lodash.js - About 1 wk to fix

            File conceptDetailsPlugin.js has 2375 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            $(function() {
                $.extend($.fn.disableTextSelect = function() {
                    return this.each(function() {
                        $(this).mousedown(function() {
                            return false;
            Severity: Major
            Found in js/conceptDetailsPlugin.js - About 6 days to fix

              Function queryComputerPanel has 1266 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function queryComputerPanel(divElement, options) {
                  var panel = this;
                  panel.showId = false;
                  var limit = 100;
                  var skip = 0;
              Severity: Major
              Found in js/queryPlugin.js - About 6 days to fix

                Function searchPanel has a Cognitive Complexity of 304 (exceeds 5 allowed). Consider refactoring.
                Open

                function searchPanel(divElement, options) {
                    var thread = null;
                    var panel = this;
                    var lastT = "";
                    var xhr = null;
                Severity: Minor
                Found in js/searchPlugin.js - About 6 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 handlebars-v1.3.0.js has 2059 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*!
                
                 handlebars v1.3.0
                
                Copyright (C) 2011 by Yehuda Katz
                Severity: Major
                Found in external-libs/handlebars-v1.3.0.js - About 5 days to fix

                  Function searchPanel has 1123 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function searchPanel(divElement, options) {
                      var thread = null;
                      var panel = this;
                      var lastT = "";
                      var xhr = null;
                  Severity: Major
                  Found in js/searchPlugin.js - About 5 days to fix

                    Function queryComputerPanel has a Cognitive Complexity of 238 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function queryComputerPanel(divElement, options) {
                        var panel = this;
                        panel.showId = false;
                        var limit = 100;
                        var skip = 0;
                    Severity: Minor
                    Found in js/queryPlugin.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 has too many statements (343). Maximum allowed is 30.
                    Open

                    this["JST"]["views/developmentQueryPlugin/main.hbs"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
                    Severity: Minor
                    Found in views/compiled/templates.js by eslint

                    enforce a maximum number of statements allowed in function blocks (max-statements)

                    The max-statements rule allows you to specify the maximum number of statements allowed in a function.

                    function foo() {
                      var bar = 1; // one statement
                      var baz = 2; // two statements
                      var qux = 3; // three statements
                    }

                    Rule Details

                    This rule enforces a maximum number of statements allowed in function blocks.

                    Options

                    This rule has a number or object option:

                    • "max" (default 10) enforces a maximum number of statements allows in function blocks

                    Deprecated: The object property maximum is deprecated; please use the object property max instead.

                    This rule has an object option:

                    • "ignoreTopLevelFunctions": true ignores top-level functions

                    max

                    Examples of incorrect code for this rule with the default { "max": 10 } option:

                    /*eslint max-statements: ["error", 10]*/
                    /*eslint-env es6*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                    
                      var foo11 = 11; // Too many.
                    }
                    
                    let foo = () => {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                    
                      var foo11 = 11; // Too many.
                    };

                    Examples of correct code for this rule with the default { "max": 10 } option:

                    /*eslint max-statements: ["error", 10]*/
                    /*eslint-env es6*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      return function () {
                    
                        // The number of statements in the inner function does not count toward the
                        // statement maximum.
                    
                        return 42;
                      };
                    }
                    
                    let foo = () => {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      return function () {
                    
                        // The number of statements in the inner function does not count toward the
                        // statement maximum.
                    
                        return 42;
                      };
                    }

                    ignoreTopLevelFunctions

                    Examples of additional correct code for this rule with the { "max": 10 }, { "ignoreTopLevelFunctions": true } options:

                    /*eslint max-statements: ["error", 10, { "ignoreTopLevelFunctions": true }]*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      var foo11 = 11;
                    }

                    Related Rules

                    • [complexity](complexity.md)
                    • [max-depth](max-depth.md)
                    • [max-len](max-len.md)
                    • [max-nested-callbacks](max-nested-callbacks.md)
                    • [max-params](max-params.md) Source: http://eslint.org/docs/rules/

                    Function 'runInContext' has too many statements (328). Maximum allowed is 30.
                    Open

                      function runInContext(context) {
                    Severity: Minor
                    Found in external-libs/lodash.js by eslint

                    enforce a maximum number of statements allowed in function blocks (max-statements)

                    The max-statements rule allows you to specify the maximum number of statements allowed in a function.

                    function foo() {
                      var bar = 1; // one statement
                      var baz = 2; // two statements
                      var qux = 3; // three statements
                    }

                    Rule Details

                    This rule enforces a maximum number of statements allowed in function blocks.

                    Options

                    This rule has a number or object option:

                    • "max" (default 10) enforces a maximum number of statements allows in function blocks

                    Deprecated: The object property maximum is deprecated; please use the object property max instead.

                    This rule has an object option:

                    • "ignoreTopLevelFunctions": true ignores top-level functions

                    max

                    Examples of incorrect code for this rule with the default { "max": 10 } option:

                    /*eslint max-statements: ["error", 10]*/
                    /*eslint-env es6*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                    
                      var foo11 = 11; // Too many.
                    }
                    
                    let foo = () => {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                    
                      var foo11 = 11; // Too many.
                    };

                    Examples of correct code for this rule with the default { "max": 10 } option:

                    /*eslint max-statements: ["error", 10]*/
                    /*eslint-env es6*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      return function () {
                    
                        // The number of statements in the inner function does not count toward the
                        // statement maximum.
                    
                        return 42;
                      };
                    }
                    
                    let foo = () => {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      return function () {
                    
                        // The number of statements in the inner function does not count toward the
                        // statement maximum.
                    
                        return 42;
                      };
                    }

                    ignoreTopLevelFunctions

                    Examples of additional correct code for this rule with the { "max": 10 }, { "ignoreTopLevelFunctions": true } options:

                    /*eslint max-statements: ["error", 10, { "ignoreTopLevelFunctions": true }]*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      var foo11 = 11;
                    }

                    Related Rules

                    • [complexity](complexity.md)
                    • [max-depth](max-depth.md)
                    • [max-len](max-len.md)
                    • [max-nested-callbacks](max-nested-callbacks.md)
                    • [max-params](max-params.md) Source: http://eslint.org/docs/rules/

                    Function has too many statements (326). Maximum allowed is 30.
                    Open

                    this["JST"]["views/conceptDetailsPlugin/main.hbs"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
                    Severity: Minor
                    Found in views/compiled/templates.js by eslint

                    enforce a maximum number of statements allowed in function blocks (max-statements)

                    The max-statements rule allows you to specify the maximum number of statements allowed in a function.

                    function foo() {
                      var bar = 1; // one statement
                      var baz = 2; // two statements
                      var qux = 3; // three statements
                    }

                    Rule Details

                    This rule enforces a maximum number of statements allowed in function blocks.

                    Options

                    This rule has a number or object option:

                    • "max" (default 10) enforces a maximum number of statements allows in function blocks

                    Deprecated: The object property maximum is deprecated; please use the object property max instead.

                    This rule has an object option:

                    • "ignoreTopLevelFunctions": true ignores top-level functions

                    max

                    Examples of incorrect code for this rule with the default { "max": 10 } option:

                    /*eslint max-statements: ["error", 10]*/
                    /*eslint-env es6*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                    
                      var foo11 = 11; // Too many.
                    }
                    
                    let foo = () => {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                    
                      var foo11 = 11; // Too many.
                    };

                    Examples of correct code for this rule with the default { "max": 10 } option:

                    /*eslint max-statements: ["error", 10]*/
                    /*eslint-env es6*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      return function () {
                    
                        // The number of statements in the inner function does not count toward the
                        // statement maximum.
                    
                        return 42;
                      };
                    }
                    
                    let foo = () => {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      return function () {
                    
                        // The number of statements in the inner function does not count toward the
                        // statement maximum.
                    
                        return 42;
                      };
                    }

                    ignoreTopLevelFunctions

                    Examples of additional correct code for this rule with the { "max": 10 }, { "ignoreTopLevelFunctions": true } options:

                    /*eslint max-statements: ["error", 10, { "ignoreTopLevelFunctions": true }]*/
                    
                    function foo() {
                      var foo1 = 1;
                      var foo2 = 2;
                      var foo3 = 3;
                      var foo4 = 4;
                      var foo5 = 5;
                      var foo6 = 6;
                      var foo7 = 7;
                      var foo8 = 8;
                      var foo9 = 9;
                      var foo10 = 10;
                      var foo11 = 11;
                    }

                    Related Rules

                    • [complexity](complexity.md)
                    • [max-depth](max-depth.md)
                    • [max-len](max-len.md)
                    • [max-nested-callbacks](max-nested-callbacks.md)
                    • [max-params](max-params.md) Source: http://eslint.org/docs/rules/

                    File ZeroClipboard.js has 1634 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*!
                     * ZeroClipboard
                     * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
                     * Copyright (c) 2014 Jon Rohan, James M. Greene
                     * Licensed MIT
                    Severity: Major
                    Found in external-libs/ZeroClipboard.js - About 4 days to fix

                      Function taxonomyPanel has 783 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function taxonomyPanel(divElement, conceptId, options) {
                          var nodeCount = 0;
                          var panel = this;
                          var xhr = null;
                          if (typeof componentsRegistry == "undefined") {
                      Severity: Major
                      Found in js/taxonomyPlugin.js - About 3 days to fix

                        File queryPlugin.js has 1268 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * Created by termmed on 9/1/14.
                         */
                        
                        function queryComputerPanel(divElement, options) {
                        Severity: Major
                        Found in js/queryPlugin.js - About 3 days to fix

                          Function setUpPanel has 660 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              this.setUpPanel = function() {
                                  var context = {
                                      divElementId: panel.divElement.id,
                                      examples: [{
                                              title: "All excision procedures that are also procedures on the digestive system",
                          Severity: Major
                          Found in js/queryPlugin.js - About 3 days to fix

                            File bootstrap.js has 1256 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*!
                             * Bootstrap v3.1.0 (http://getbootstrap.com)
                             * Copyright 2011-2014 Twitter, Inc.
                             * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
                             */
                            Severity: Major
                            Found in external-libs/bootstrap.js - About 3 days to fix
                              Severity
                              Category
                              Status
                              Source
                              Language