ncbo/bioportal_web_ui

View on GitHub

Showing 628 of 628 total issues

Function formatNodes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var formatNodes = function(nodes) {
      var holder = $("<span>");
      var ul = $("<ul>")

      // Sort by prefLabel
Severity: Minor
Found in public/widgets/jquery.ncbo.tree-2.0.2.js - About 1 hr to fix

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

        jQuery.fn.bp_autocomplete = function(url, options, data) {
          // Make sure options exists
          options = options || {};
          // Set url as option
          options.url = url;
    Severity: Minor
    Found in public/javascripts/bp_crossdomain_autocomplete.js - About 1 hr to fix

      Function formatNodes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var formatNodes = function(nodes) {
            var holder = $("<span>");
            var ul = $("<ul>")
      
            // Sort by prefLabel
      Severity: Minor
      Found in public/widgets/jquery.ncbo.tree-2.0.1.js - About 1 hr to fix

        Function formatNodes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              TREE.formatNodes = function(nodes) {
                var holder = $("<span>");
                var ul = $("<ul>")
        
                // Sort by prefLabel
        Severity: Minor
        Found in public/widgets/jquery.ncbo.tree.js - About 1 hr to fix

          Function serialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function serialize(object) {
              var out;
          
              if (angular.isElement(object)) {
                object = angular.element(object);
          Severity: Minor
          Found in public/browse/lib/angular-mocks/angular-mocks.js - About 1 hr to fix

            Function closeAnimation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function closeAnimation() {
                      if (!closeAnimation.hasBeenRun) {
                        if (runner) { //the runner doesn't exist if it fails to instantiate
                          runner.applyStyles();
                        }
            Severity: Minor
            Found in public/browse/lib/angular-animate/angular-animate.js - About 1 hr to fix

              Function formatNodes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var formatNodes = function(nodes) {
                    var holder = $("<span>");
                    var ul = $("<ul>")
              
                    // Sort by prefLabel
              Severity: Minor
              Found in public/widgets/jquery.ncbo.tree-2.0.0.js - About 1 hr to fix

                Function resolveElementClasses has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function resolveElementClasses(element, cache, runningAnimations) {
                        runningAnimations = runningAnimations || {};
                
                        var lookup = {};
                        forEach(runningAnimations, function(data, selector) {
                Severity: Minor
                Found in public/browse/lib/angular-animate/angular-animate.js - About 1 hr to fix

                  Function get_class_details_from_raw has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function get_class_details_from_raw(cls) {
                    var
                      ont_acronym = cls.links.ontology.replace(/.*\//, ''),
                      ont_name = annotator_ontologies[cls.links.ontology].name,
                      ont_rel_ui = '/ontologies/' + ont_acronym,
                  Severity: Minor
                  Found in app/assets/javascripts/bp_annotator.js - About 1 hr to fix

                    Function get_class_details_from_raw has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function get_class_details_from_raw(cls) {
                      var
                        ont_acronym = cls.links.ontology.replace(/.*\//, ''),
                        ont_name = annotator_ontologies[cls.links.ontology].name,
                        ont_rel_ui = '/ontologies/' + ont_acronym,
                    Severity: Minor
                    Found in app/assets/javascripts/bp_annotatorplus.js - About 1 hr to fix

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

                          jQuery.fn.bp_autocomplete = function(url, options, data) {
                            // Make sure options exists
                            options = options || {};
                            // Set url as option
                            options.url = url;
                      Severity: Minor
                      Found in app/assets/javascripts/bp_crossdomain_autocomplete.js - About 1 hr to fix

                        Method simplify_class_model has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def simplify_class_model(cls_model)
                            # Simplify the class required required by the UI.
                            # No modification of the class ontology here, see simplify_classes.
                            # Default simple class model
                            cls = { :id => nil, :ontology => nil, :prefLabel => nil, :uri => nil, :ui => nil, :obsolete => false }
                        Severity: Minor
                        Found in app/controllers/application_controller.rb - About 1 hr to fix

                          Function display_annotations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function display_annotations(data, params) {
                            "use strict";
                            var annotations = data.annotations;
                            var all_rows = [];
                            if (params.raw !== undefined && params.raw === true) {
                          Severity: Minor
                          Found in app/assets/javascripts/bp_annotatorplus.js - About 1 hr to fix

                            Method virtual_show has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def virtual_show
                                note_id = params[:noteid]
                                concept_id = params[:conceptid]
                                ontology_acronym = params[:ontology]
                            
                            
                            Severity: Minor
                            Found in app/controllers/notes_controller.rb - About 1 hr to fix

                              Function performAnimation has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                    function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
                              Severity: Major
                              Found in public/browse/lib/angular-animate/angular-animate.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                    } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
                                            typeof Components !== 'undefined' && Components.classes &&
                                            Components.interfaces)) {
                                        //Avert your gaze!
                                        Cc = Components.classes,
                                Severity: Major
                                Found in public/browse/lib/lunr.js/example/text.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                              if (value && value.length !== 0)
                                              {
                                                  var v = angular.lowercase("" + value);
                                                  value = !(v === 'f' || v === '0' || v === 'false' || v === 'no' || v === 'n' || v === '[]');
                                              }
                                  Severity: Major
                                  Found in public/browse/lib/angular-bindonce/bindonce.js - About 1 hr to fix

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

                                              if (data.notices) {
                                                var notice = data.notices.replace(reg, ',');
                                                notices.push.apply(notices, notice.split(","));
                                              }
                                    Severity: Major
                                    Found in app/assets/javascripts/bp_admin.js and 1 other location - About 1 hr to fix
                                    app/assets/javascripts/bp_admin.js on lines 152..155

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

                                    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

                                              if (data.success) {
                                                var suc = data.success.replace(reg, ',');
                                                success.push.apply(success, suc.split(","));
                                              }
                                    Severity: Major
                                    Found in app/assets/javascripts/bp_admin.js and 1 other location - About 1 hr to fix
                                    app/assets/javascripts/bp_admin.js on lines 157..160

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

                                    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

                                    lunr.Vector = function () {
                                      this._magnitude = null
                                      this.list = undefined
                                      this.length = 0
                                    }
                                    Severity: Minor
                                    Found in public/browse/lib/lunr.js/lib/vector.js and 1 other location - About 55 mins to fix
                                    public/browse/lib/lunr.js/lunr.js on lines 429..433

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

                                    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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language