IHTSDO/snomed-interaction-components

View on GitHub

Showing 340 of 6,870 total issues

Function Canvas2Image has 175 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Canvas2Image = function () {

    // check if support sth.
    var $support = function () {
        var canvas = document.createElement('canvas'),
Severity: Major
Found in external-libs/canvas2image.js - About 7 hrs to fix

    Function __module7__ has 174 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var __module7__ = (function(__dependency1__) {
      "use strict";
      var __exports__;
      var Exception = __dependency1__;
    
    
    Severity: Major
    Found in external-libs/handlebars-v1.3.0.js - About 6 hrs to fix

      Function setupCanvas has 170 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.setupCanvas = function() {
              var context = {
                  divElementId: panel.divElement.id
              };
              $(divElement).html(JST["views/taxonomyPlugin/main.hbs"](context));
      Severity: Major
      Found in js/taxonomyPlugin.js - About 6 hrs to fix

        Function loadMembers has 165 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            this.loadMembers = function(conceptId, term, returnLimit, skipTo, paginate) {
                var branch = options.edition;
                if(options.release.length > 0 && options.release !== 'None'){
                    branch = branch + "/" + options.release;
                };
        Severity: Major
        Found in js/refsetPlugin.js - About 6 hrs to fix

          Function drawConceptDiagram has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
          Open

          function drawConceptDiagram (concept, div, options, panel) {
              
              var getDefautTermForRelationShip = function (concept) {
                  if(concept.pt.lang === options.defaultLanguage && options.defaultLanguage != 'en' && concept.fsn.lang != options.defaultLanguage){
                      return concept.pt.term;
          Severity: Minor
          Found in js/drawConceptDiagram.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 splitter has 149 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

           $.fn.splitter = function(args){
              args = args || {};
              return this.each(function() {
                  var zombie;        // left-behind splitbar for outline resizes
                  function startSplitMouse(evt) {
          Severity: Major
          Found in external-libs/jquery.layout-1.2.0.js - About 5 hrs to fix

            Function __module2__ has 149 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var __module2__ = (function(__dependency1__, __dependency2__) {
              "use strict";
              var __exports__ = {};
              var Utils = __dependency1__;
              var Exception = __dependency2__;
            Severity: Major
            Found in external-libs/handlebars-v1.3.0.js - About 5 hrs to fix

              Function loadMembers has 145 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  this.loadMembers = function(returnLimit, skipTo, paginate) {
                      var branch = options.edition;
                      if(options.release.length > 0 && options.release !== 'None'){
                          branch = branch + "/" + options.release;
                      };
              Severity: Major
              Found in js/conceptDetailsPlugin.js - About 5 hrs to fix

                Function setupCanvas has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    this.setupCanvas = function() {
                        panel.attributesPId = panel.divElement.id + "-attributes-panel";
                        panel.descsPId = panel.divElement.id + "-descriptions-panel";
                        panel.relsPId = panel.divElement.id + "-rels-panel";
                        panel.childrenPId = panel.divElement.id + "-children-panel";
                Severity: Major
                Found in js/conceptDetailsPlugin.js - About 5 hrs to fix

                  File drawConceptDiagram.js has 383 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  function drawConceptDiagram (concept, div, options, panel) {
                      
                      var getDefautTermForRelationShip = function (concept) {
                          if(concept.pt.lang === options.defaultLanguage && options.defaultLanguage != 'en' && concept.fsn.lang != options.defaultLanguage){
                              return concept.pt.term;
                  Severity: Minor
                  Found in js/drawConceptDiagram.js - About 5 hrs to fix

                    Function exportToConstraintGrammar has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        this.exportToConstraintGrammar = function(htmlFormat, fullSyntax, htmlObj, fullObjHtml) {
                            var breakLine = " ";
                            if (htmlFormat) {
                                breakLine = "<br>";
                            }
                    Severity: Major
                    Found in js/queryPlugin.js - About 5 hrs to fix

                      Function setupParents has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          this.setupParents = function(parents, focusConcept) {
                              console.log(focusConcept);
                              var lastParent;
                              $.each(parents, function(i, parent) {
                                  lastParent = parent;
                      Severity: Major
                      Found in js/taxonomyPlugin.js - About 5 hrs to fix

                        Function baseIsEqual has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
                              // used to indicate that when comparing objects, `a` has at least the properties of `b`
                              if (callback) {
                                var result = callback(a, b);
                                if (typeof result != 'undefined') {
                        Severity: Major
                        Found in external-libs/lodash.js - About 4 hrs to fix

                          Function _preprocessEvent has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            var _preprocessEvent = function(event) {
                              var element = event.target || _currentElement || null;
                              var sourceIsSwf = event._source === "swf";
                              delete event._source;
                              var flashErrorNames = [ "flash-disabled", "flash-outdated", "flash-unavailable", "flash-deactivated", "flash-overdue" ];
                          Severity: Major
                          Found in external-libs/ZeroClipboard.js - About 4 hrs to fix

                            Function __module6__ has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var __module6__ = (function(__dependency1__, __dependency2__, __dependency3__) {
                              "use strict";
                              var __exports__ = {};
                              var Utils = __dependency1__;
                              var Exception = __dependency2__;
                            Severity: Major
                            Found in external-libs/handlebars-v1.3.0.js - About 4 hrs to fix

                              Function border has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  jLayout.border = function (spec) {
                                      var my = {},
                                          that = {},
                                          east = spec.east,
                                          west = spec.west,
                              Severity: Major
                              Found in external-libs/jlayout.border.js - About 4 hrs to fix

                                Function exports has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                module.exports = function(grunt) {
                                
                                    // Project configuration.
                                    grunt.initConfig({
                                        pkg: grunt.file.readJSON('package.json'),
                                Severity: Major
                                Found in Gruntfile.js - About 4 hrs to fix

                                  Function getChildren has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      this.getChildren = function(conceptId) {
                                          if (typeof panel.options.selectedView == "undefined") {
                                              panel.options.selectedView = "inferred";
                                          }
                                  
                                  
                                  Severity: Major
                                  Found in js/taxonomyPlugin.js - About 4 hrs to fix

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

                                      parse: function parse(input) {
                                          var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
                                          this.lexer.setInput(input);
                                          this.lexer.yy = this.yy;
                                          this.yy.lexer = this.lexer;
                                    Severity: Major
                                    Found in external-libs/handlebars-v1.3.0.js - About 4 hrs to fix

                                      Function wrapInParents has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          this.wrapInParents = function(conceptId, liItem) {
                                              var topUl = $("#" + panel.divElement.id + "-panelBody").find('ul:first');
                                              var branch = options.edition;
                                              if(options.release.length > 0 && options.release !== 'None'){
                                                  branch = branch + "/" + options.release;
                                      Severity: Major
                                      Found in js/taxonomyPlugin.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language