IHTSDO/snomed-interaction-components

View on GitHub

Showing 340 of 6,870 total issues

Function conceptDetails has a Cognitive Complexity of 130 (exceeds 5 allowed). Consider refactoring.
Open

function conceptDetails(divElement, conceptId, options) {

    if (typeof componentsRegistry == "undefined") {
        componentsRegistry = [];
    }
Severity: Minor
Found in js/conceptDetailsPlugin.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 __module9__ has 468 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var __module9__ = (function() {
  "use strict";
  var __exports__;
  /* jshint ignore:start */
  /* Jison generated parser */
Severity: Major
Found in external-libs/handlebars-v1.3.0.js - About 2 days to fix

    Function handlebars has 464 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var handlebars = (function(){
      var parser = {trace: function trace() { },
      yy: {},
      symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"sexpr":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"sexpr_repetition0":28,"sexpr_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"OPEN_SEXPR":35,"CLOSE_SEXPR":36,"hash":37,"hash_repetition_plus0":38,"hashSegment":39,"ID":40,"EQUALS":41,"DATA":42,"pathSegments":43,"SEP":44,"$accept":0,"$end":1},
      terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},
    Severity: Major
    Found in external-libs/handlebars-v1.3.0.js - About 2 days to fix

      File jquery.svg.js has 863 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* http://keith-wood.name/svg.html
         SVG for jQuery v1.4.5.
         Written by Keith Wood (kbwood{at}iinet.com.au) August 2007.
         Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
         MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. 
      Severity: Major
      Found in external-libs/jquery.svg.js - About 2 days to fix

        File taxonomyPlugin.js has 810 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * To change this license header, choose License Headers in Project Properties.
         * To change this template file, choose Tools | Templates
         * and open the template in the editor.
         */
        Severity: Major
        Found in js/taxonomyPlugin.js - About 1 day to fix

          Function drawConceptDiagram has 381 lines of code (exceeds 25 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: Major
          Found in js/drawConceptDiagram.js - About 1 day to fix

            Function __module10__ has 358 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function renderDiagram has 332 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var renderDiagram = function(concept, div, options, ungroupedAttributes) {
                      var svgIsaModel = [];
                      var svgAttrModel = [];
                      var axioms = [];
                      if (options.selectedView == "stated") {
              Severity: Major
              Found in js/drawConceptDiagram.js - About 1 day to fix

                Function taxonomyPanel has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring.
                Open

                function taxonomyPanel(divElement, conceptId, options) {
                    var nodeCount = 0;
                    var panel = this;
                    var xhr = null;
                    if (typeof componentsRegistry == "undefined") {
                Severity: Minor
                Found in js/taxonomyPlugin.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 success has 315 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                         success: function(result) { 
                                        var resDescriptions = [];
                                        $.each(result.items, function(i, field) {
                                            var aux = field;
                                            aux.definitionStatus = result.definitionStatus;
                Severity: Major
                Found in js/searchPlugin.js - About 1 day to fix

                  Function refsetPanel has 260 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function refsetPanel(divElement, options) {
                      var panel = this;
                      this.divElement = divElement;
                      this.options = jQuery.extend(true, {}, options);
                      var favoriteCall = null;
                  Severity: Major
                  Found in js/refsetPlugin.js - About 1 day to fix

                    Function loadDesriptionsPanel has 254 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                var loadDesriptionsPanel =  function (firstMatch) {
                                    var allLangsHtml = "";
                                    firstMatch.descriptions.sort(function(a, b) {
                                        if (a.lang == options.defaultLanguage && b.lang != options.defaultLanguage)
                                            return -1;
                    Severity: Major
                    Found in js/conceptDetailsPlugin.js - About 1 day to fix

                      Function split has 248 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $.fn.split = function(options) {
                              var data = this.data('splitter');
                              if (data) {
                                  return data;
                              }
                      Severity: Major
                      Found in js/jquery.splitter-0.14.0.js - About 1 day to fix

                        Function lexer has 247 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var lexer = (function(){
                          var lexer = ({EOF:1,
                          parseError:function parseError(str, hash) {
                                  if (this.yy.parser) {
                                      this.yy.parser.parseError(str, hash);
                        Severity: Major
                        Found in external-libs/handlebars-v1.3.0.js - About 1 day to fix

                          Function execute has 246 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              this.execute = function(form, expression, clean, onlyTotal) {
                                  panel.currentEx++;
                                  var currentEx = panel.currentEx;
                                  //$('#' + panel.divElement.id + '-footer').html("<i class='glyphicon glyphicon-refresh icon-spin'></i>");
                                  if (onlyTotal) {
                          Severity: Major
                          Found in js/queryPlugin.js - About 1 day to fix

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

                                this.setupCanvas = function() {
                                    var server = 'snowstorm';
                                    if(options.serverUrl.includes('snowowl')){
                                       server = 'snowowl';
                                    };
                            Severity: Major
                            Found in js/searchPlugin.js - About 1 day to fix

                              File popover.js has 555 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              !function ($) {
                                  /* =======================
                                   *   Popover jQuery Plugin
                                   *  =======================
                                   *  Current version: v1.0.0, Last updated: 01-28-2013
                              Severity: Major
                              Found in js/popover.js - About 1 day to fix

                                File notify.js has 539 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /** Notify.js - v0.3.1 - 2014/02/06
                                 * http://notifyjs.com/
                                 * Copyright (c) 2014 Jaime Pillora - MIT
                                 */
                                (function(window,document,$,undefined) {
                                Severity: Major
                                Found in external-libs/notify.js - About 1 day to fix

                                  File postal.js has 502 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /**
                                   * postal - Pub/Sub library providing wildcard subscriptions, complex message handling, etc.  Works server and client-side.
                                   * Author: Jim Cowart (http://freshbrewedcode.com/jimcowart)
                                   * Version: v0.10.0
                                   * Url: http://github.com/postaljs/postal.js
                                  Severity: Major
                                  Found in external-libs/postal.js - About 1 day to fix

                                    Function Canvas2Image has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    var Canvas2Image = function () {
                                    
                                        // check if support sth.
                                        var $support = function () {
                                            var canvas = document.createElement('canvas'),
                                    Severity: Minor
                                    Found in external-libs/canvas2image.js - About 7 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language