ncbo/bioportal_web_ui

View on GitHub

Showing 306 of 628 total issues

File virtual_from_version.rb has 7144 lines of code (exceeds 250 allowed). Consider refactoring.
Open

BPIDResolver::VIRTUAL_FROM_VERSION = {
  "old:virtual_from_version:40876" => 1048,
  "old:virtual_from_version:44059" => 1125,
  "old:virtual_from_version:46266" => 1172,
  "old:virtual_from_version:44870" => 1077,
Severity: Major
Found in lib/resolver/virtual_from_version.rb - About 2 wks to fix

    File angular-animate.js has 1105 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @license AngularJS v1.3.5
     * (c) 2010-2014 Google, Inc. http://angularjs.org
     * License: MIT
     */
    Severity: Major
    Found in public/browse/lib/angular-animate/angular-animate.js - About 2 days to fix

      File angular-mocks.js has 946 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * @license AngularJS v1.3.5
       * (c) 2010-2014 Google, Inc. http://angularjs.org
       * License: MIT
       */
      Severity: Major
      Found in public/browse/lib/angular-mocks/angular-mocks.js - About 2 days to fix

        File bp_admin.js has 867 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Created by mdorf on 3/27/15.
         * Updated by Syphax.Bouazzouni on 28/04/21 , users admin part
         */
        
        
        Severity: Major
        Found in app/assets/javascripts/bp_admin.js - About 2 days to fix

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

          /**
           * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.6
           * Copyright (C) 2014 Oliver Nightingale
           * MIT Licensed
           * @license
          Severity: Major
          Found in public/browse/lib/lunr.js/lunr.js - About 2 days to fix

            Function bp_autocomplete has 371 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                jQuery.bp_autocomplete = function(input, options) {
                  // Create a link to self
                  var me = this;
            
                  // Create jQuery object for input element
            Severity: Major
            Found in public/javascripts/bp_crossdomain_autocomplete.js - About 1 day to fix

              Function bp_autocomplete has 371 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  jQuery.bp_autocomplete = function(input, options) {
                    // Create a link to self
                    var me = this;
              
                    // Create jQuery object for input element
              Severity: Major
              Found in app/assets/javascripts/bp_crossdomain_autocomplete.js - About 1 day to fix

                Function NCBOTree has 370 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  $.fn.NCBOTree = function(opt) {
                    var OPTIONS;
                    var ROOT_ID = "roots";
                
                    OPTIONS = {
                Severity: Major
                Found in public/widgets/jquery.ncbo.tree.js - About 1 day to fix

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

                      jQuery.bioportal_autocomplete = function(input, options) {
                        // Create a link to self
                        var me = this;
                  
                        // Create jQuery object for input element

                    File bp_annotatorplus.js has 717 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    var
                      bp_last_params = null,
                      annotationsTable = null,
                      annotator_ontologies = null;
                    
                    
                    Severity: Major
                    Found in app/assets/javascripts/bp_annotatorplus.js - About 1 day to fix

                      Function NCBOTree has 309 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var NCBOTree = function(element, opt) {
                          var _this = this;
                          var OPTIONS;
                          var ROOT_ID = "roots";
                          var mousePressed = false;
                      Severity: Major
                      Found in public/widgets/jquery.ncbo.tree-2.0.0.js - About 1 day to fix

                        Function NCBOTree has 309 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var NCBOTree = function(element, opt) {
                            var _this = this;
                            var OPTIONS;
                            var ROOT_ID = "roots";
                            var mousePressed = false;
                        Severity: Major
                        Found in public/widgets/jquery.ncbo.tree-2.0.1.js - About 1 day to fix

                          Function NCBOTree has 309 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            var NCBOTree = function(element, opt) {
                              var _this = this;
                              var OPTIONS;
                              var ROOT_ID = "roots";
                              var mousePressed = false;
                          Severity: Major
                          Found in public/widgets/jquery.ncbo.tree-2.0.2.js - About 1 day to fix

                            Function app has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
                            Open

                            .controller('OntologyList', ['$scope', '$animate', '$timeout', function($scope, $animate, $timeout) {
                              // Default values
                              $scope.visible_ont_count = 0;
                              $scope.ontology_sort_order = "-popularity";
                              $scope.previous_sort_order = "-popularity";
                            Severity: Minor
                            Found in public/browse/app.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

                            File bp_annotator.js has 633 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            var
                              bp_last_params = null,
                              annotationsTable = null,
                              annotator_ontologies = null;
                            
                            
                            Severity: Major
                            Found in app/assets/javascripts/bp_annotator.js - About 1 day to fix

                              Function NCBOAutocomplete has 268 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                $.fn.NCBOAutocomplete = function(settings) {
                                  var defaults = {
                                      url: '',
                                      data: [],
                                      minCharacters: 1,
                              Severity: Major
                              Found in public/widgets/jquery.ncbo.autocomplete.js - About 1 day to fix

                                Function app has 251 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                .controller('OntologyList', ['$scope', '$animate', '$timeout', function($scope, $animate, $timeout) {
                                  // Default values
                                  $scope.visible_ont_count = 0;
                                  $scope.ontology_sort_order = "-popularity";
                                  $scope.previous_sort_order = "-popularity";
                                Severity: Major
                                Found in public/browse/app.js - About 1 day to fix

                                  Function NCBOPropertyTree has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    var NCBOPropertyTree = function(element, opt) {
                                      var obj = this;
                                      var OPTIONS;
                                      var ROOT_ID = "roots";
                                  
                                  
                                  Severity: Major
                                  Found in app/assets/javascripts/bp_property_tree.js - About 1 day to fix

                                    Function $RouteProvider has 222 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function $RouteProvider() {
                                      function inherit(parent, extra) {
                                        return angular.extend(Object.create(parent), extra);
                                      }
                                    
                                    
                                    Severity: Major
                                    Found in public/browse/lib/angular-route/angular-route.js - About 1 day to fix

                                      File acronym_from_virtual.rb has 535 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      BPIDResolver::ACRONYM_FROM_VIRTUAL = {
                                        "old:acronym_from_virtual:3013" => "DIAGONT",
                                        "old:acronym_from_virtual:3245" => "SuicidO",
                                        "old:acronym_from_virtual:1247" => "GEOSPECIES",
                                        "old:acronym_from_virtual:1054" => "AMINO-ACID",
                                      Severity: Major
                                      Found in lib/resolver/acronym_from_virtual.rb - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language