expertiza/expertiza

View on GitHub

Showing 431 of 4,497 total issues

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

  def check_submission_state(response_map, assignment_created, assignment_due_dates, round, color)
Severity: Minor
Found in app/helpers/review_mapping_helper.rb - About 35 mins to fix

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

      def display_as_html(prefix = nil, count = nil, _file_url = nil, show_tags = nil, current_user = nil)
    Severity: Minor
    Found in app/models/response.rb - About 35 mins to fix

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

        def get_total_score_for_question(review_type, question_id, participant_id, assignment_id, reviewee_id)
      Severity: Minor
      Found in app/models/cake.rb - About 35 mins to fix

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

            def summarize_reviews_by_reviewee(questions, assignment, reviewee_id, summary_ws_url, _session = nil)
        Severity: Minor
        Found in app/helpers/summary_helper.rb - About 35 mins to fix

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

            def self.export_individual_data_fields(review_type, score_name, teams_csv, participants_score, options)
          Severity: Minor
          Found in app/models/assignment.rb - About 35 mins to fix

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

              def complete(count, answer = nil, questionnaire_min, questionnaire_max, dropdown_or_scale)
            Severity: Minor
            Found in app/models/criterion.rb - About 35 mins to fix

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

                def add_participant(user_name, can_submit, can_review, can_take_quiz, can_mentor)
              Severity: Minor
              Found in app/models/assignment.rb - About 35 mins to fix

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

                  def view_completed_question(count, answer, questionnaire_max, tag_prompt_deployments = nil, current_user = nil)
                Severity: Minor
                Found in app/models/criterion.rb - About 35 mins to fix

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

                    def get_answers_for_teammatereview(team_id, question_id, participant_id, assignment_id, reviewee_id)
                  Severity: Minor
                  Found in app/models/cake.rb - About 35 mins to fix

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

                      def self.get_total_score_for_questions(review_type, questions, participant_id, assignment_id, reviewee_id)
                    Severity: Minor
                    Found in app/models/cake.rb - About 35 mins to fix

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

                        def self.send_mail_for_conference_user(user, subject, partial_name, password, conference_variable)
                      Severity: Minor
                      Found in app/helpers/mailer_helper.rb - About 35 mins to fix

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

                          def topic_due(type, time, topic_id, round, review_allowed_id = 3)
                        Severity: Minor
                        Found in spec/features/staggered_deadline_spec.rb - About 35 mins to fix

                          Method rubric_weight_error has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def rubric_weight_error(attributes)
                              error = false
                              attributes[:assignment_questionnaire].each do |assignment_questionnaire|
                                # Check rubrics to make sure weight is 0 if there are no Scored Questions
                                scored_questionnaire = false
                          Severity: Minor
                          Found in app/models/assignment_form.rb - 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

                          Method markup_content has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def markup_content
                              markup = markup_style
                              if markup && markup.name
                                if markup.name == 'Textile'
                                  RedCloth.new(content).to_html(:textile)
                          Severity: Minor
                          Found in app/models/content_page.rb - 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

                          Method import has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def self.import(row_hash, session, _id = nil)
                              raise 'Not enough items: expect 2 or more columns: Topic Identifier, User Name 1, User Name 2, ...' if row_hash.length < 2
                          
                              imported_topic = SignUpTopic.where(topic_identifier: row_hash[:topic_identifier], assignment_id: session[:assignment_id]).first
                          
                          
                          Severity: Minor
                          Found in app/models/sign_up_sheet.rb - 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

                          Method copy_questionnaire_details has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def self.copy_questionnaire_details(params, instructor_id)
                              orig_questionnaire = Questionnaire.find(params[:id])
                              questions = Question.where(questionnaire_id: params[:id])
                              questionnaire = orig_questionnaire.dup
                              questionnaire.instructor_id = instructor_id
                          Severity: Minor
                          Found in app/models/questionnaire.rb - 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 GenCell has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function GenCell(pValue,pHighLight,pColor)//Generate table cell with value
                          {
                              var PValue;
                              var PCellStr;
                              var vColor;
                          Severity: Minor
                          Found in app/assets/javascripts/datetimepicker.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 cycleit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                              cycleit:function(dir, autorun){ //PUBLIC function to move forward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
                                  if (dir=="next"){
                                      var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
                                  }
                                  else if (dir=="prev"){
                          Severity: Minor
                          Found in app/assets/javascripts/ajaxtabs.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 toggleTeam has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            function toggleTeam(elementId) {
                                var sublistsize = 1;
                                var obj = document.getElementById(elementId + '_' + sublistsize);
                                var atag = document.getElementById(elementId + 'Link');
                                var header = document.getElementById(elementId + '_header');
                          Severity: Minor
                          Found in app/assets/javascripts/grading.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 getSelectedName has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function getSelectedName(){
                              var tbl = document.getElementById("file_table");
                              var numChecks = 0;
                              for(i=0; i<document.forms[2].elements.length; i++){
                                  if(document.forms[2].elements[i].type=="radio" &&
                          Severity: Minor
                          Found in app/assets/javascripts/submissions.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