SysMO-DB/seek

View on GitHub

Showing 714 of 1,025 total issues

Method ontology_select_tag has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def ontology_select_tag form,type,element_id,selected_uri,html_options={}
Severity: Minor
Found in app/helpers/ontology_helper.rb - About 35 mins to fix

    Method list_samples_and_assay_organisms has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      def list_samples_and_assay_organisms attribute, assay_samples, assay_organisms, html_options={}, none_text="Not Specified"
    Severity: Minor
    Found in app/helpers/assays_helper.rb - About 35 mins to fix

      Method authorized_list has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def authorized_list all_items, attribute, sort=true, max_length=75, count_hidden_items=false
      Severity: Minor
      Found in app/helpers/application_helper.rb - About 35 mins to fix

        Method ontology_selection_list has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def ontology_selection_list type, element_name, selected_uri, disabled_uris={}, html_options={}
        Severity: Minor
        Found in app/helpers/suggested_assay_types_helper.rb - About 35 mins to fix

          Method edge_element has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def edge_element id, name, source, target, fave_color
          Severity: Minor
          Found in app/helpers/i_s_a_helper.rb - About 35 mins to fix

            Method node_element has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def node_element id, name, item_info, fave_color, border_color
            Severity: Minor
            Found in app/helpers/i_s_a_helper.rb - About 35 mins to fix

              Method assay_type_select_tag has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def assay_type_select_tag form, is_modelling,element_id, selected_uri,html_options={}
              Severity: Minor
              Found in app/helpers/ontology_helper.rb - About 35 mins to fix

                Method assets_list_xml has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def assets_list_xml builder,assets,tag="assets",include_core=true,include_resource=true
                Severity: Minor
                Found in app/helpers/api_helper.rb - About 35 mins to fix

                  Method associate_organism has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def associate_organism(organism,strain_id=nil,culture_growth_type=nil,tissue_and_cell_type_id="0",tissue_and_cell_type_title=nil)
                  Severity: Minor
                  Found in app/models/assay.rb - About 35 mins to fix

                    Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            def initialize(v=nil, r=nil, c=nil, f=nil, s=nil)
                    Severity: Minor
                    Found in lib/seek/data/spreadsheet_explorer_representation.rb - About 35 mins to fix

                      Method get_remote_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def get_remote_data url, username=nil, password=nil, type=nil, include_data=true      
                      Severity: Minor
                      Found in lib/seek/remote_downloader.rb - About 35 mins to fix

                        Method extract_as_table has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                              def extract_as_table treatments_heading_row, sample_col, treatments_first_col,treatments_last_col,sheet
                        Severity: Minor
                        Found in lib/seek/data/treatments.rb - About 35 mins to fix

                          Method cache has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def cache file_obj,data_result,url,username,password
                          Severity: Minor
                          Found in lib/seek/remote_downloader.rb - About 35 mins to fix

                            Method get_remote_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def get_remote_data url, username=nil, password=nil, type=nil, include_data=true
                            Severity: Minor
                            Found in lib/jerm/translucent_downloader.rb - About 35 mins to fix

                              Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                    def initialize uri,label=nil,description=nil,subclasses=[],parents=[]
                              Severity: Minor
                              Found in lib/seek/ontologies/ontology_class.rb - About 35 mins to fix

                                Function check_show_existing_items has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function check_show_existing_items(organism_element_id, existing_items_element_id, url) {
                                    var selected_ids = $F(organism_element_id).join();
                                    if (selected_ids == '0') {
                                        if ($(existing_items_element_id + "_spinner") != null)
                                            Effect.Fade(existing_items_element_id + "_spinner");
                                Severity: Minor
                                Found in app/assets/javascripts/biosample.js - About 35 mins 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 bindAnnotations has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function bindAnnotations(annotation_sources) {
                                    var annotationIndexTable = $j("div#annotation_overview table");
                                    for(var s = 0; s < annotation_sources.size(); s++)
                                    {
                                        var source = annotation_sources[s];
                                Severity: Minor
                                Found in app/assets/javascripts/spreadsheet_explorer.js - About 35 mins 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 updateDisciplines has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function updateDisciplines() {
                                    discipline_text=''
                                    type="Discipline"
                                    discipline_ids=new Array();
                                
                                
                                Severity: Minor
                                Found in app/assets/javascripts/people.js - About 35 mins 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 updateOrganisms has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function updateOrganisms() {
                                    organism_text=''
                                    type="Organism"
                                    organism_ids=new Array();
                                
                                
                                Severity: Minor
                                Found in app/assets/javascripts/projects.js - About 35 mins 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 validateUploadFormFields has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function validateUploadFormFields(respond_to_content_blobs, resource_name) {
                                    if (respond_to_content_blobs) {
                                        if ($('pending_files').children.length == 0 && $(resource_name + "_image_image_file") == null) {
                                            alert("Please specify at least a file to upload or provide a URL.");
                                            return (false);
                                Severity: Minor
                                Found in app/assets/javascripts/resource.js - About 35 mins 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