expertiza/expertiza

View on GitHub

Showing 4,506 of 4,506 total issues

Class has too many lines. [469/100]
Open

class ReviewMappingController < ApplicationController
  include AuthorizationHelper

  autocomplete :user, :name
  # helper :dynamic_review_assignment

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

File tree_display.jsx has 1392 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// initialize a global object available throughout the application
// can be useful on different pages
let app_variables = {

  currentUserId: null,
Severity: Major
Found in app/assets/javascripts/tree_display.jsx - About 3 days to fix

    Block has too many lines. [359/25]
    Open

    describe Assessment360Controller do
      let(:instructor) { build(:instructor, id: 6) }
      let(:student) { build(:student, id: 6) }
      let(:ta) { build(:teaching_assistant, id: 6) }
      let(:administrator) { build(:admin, id: 6) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [355/25]
    Open

    describe UsersController do
      let(:admin) { build(:admin, id: 3) }
      let(:super_admin) { build(:superadmin) }
      let(:instructor) { build(:instructor, id: 2) }
      let(:student1) { build(:student, id: 1, name: :lily) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [341/25]
    Open

    describe 'AssignmentTeam' do
      let(:team_without_submitted_hyperlinks) { build(:assignment_team, submitted_hyperlinks: '') }
      let(:team) { build(:assignment_team, id: 1, parent_id: 1) }
      let(:assignment) { build(:assignment, id: 1) }
      let(:participant1) { build(:participant, id: 1) }
    Severity: Minor
    Found in spec/models/assignment_team_spec.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [336/25]
    Open

    describe QuizQuestionnairesController do
      let(:questionnaire) do
        build(id: 1, name: 'questionnaire', ta_id: 8, course_id: 1, private: false, min_question_score: 0, max_question_score: 5, type: 'ReviewQuestionnaire')
      end
      let(:questionnaire) { build(:questionnaire) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Class has too many lines. [397/100]
    Open

    class SignUpSheetController < ApplicationController
      include AuthorizationHelper
    
      require 'rgl/adjacency'
      require 'rgl/dot'

    This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

    Block has too many lines. [327/25]
    Open

    describe Response do
      let(:user) { build(:student, id: 1, role_id: 1, name: 'no name', fullname: 'no one') }
      let(:user2) { build(:student, id: 2, role_id: 2, name: 'no name2', fullname: 'no one2') }
      let(:participant) { build(:participant, id: 1, parent_id: 1, user: user) }
      let(:participant2) { build(:participant, id: 2, parent_id: 2, user: user2) }
    Severity: Minor
    Found in spec/models/response_spec.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [325/25]
    Open

    describe SubmittedContentController do
      let(:admin) { build(:admin, id: 3) }
      let(:super_admin) { build(:superadmin, id: 1, role_id: 5) }
      let(:instructor1) { build(:instructor, id: 10, role_id: 3, parent_id: 3, name: 'Instructor1') }
      let(:student1) { build(:student, id: 21, role_id: 1) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Class has too many lines. [391/100]
    Open

    class AssignmentsController < ApplicationController
      include AssignmentHelper
      include AuthorizationHelper
      autocomplete :user, :name
      before_action :authorize

    This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

    Block has too many lines. [314/25]
    Open

      describe '#valid_quiz' do
        before(:each) do
          allow(Assignment).to receive_message_chain(:find, :num_quiz_questions).with('1').with(no_args).and_return(1)
        end
    
    

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [313/25]
    Open

    describe StudentTask do
      # Write your mocked object here!
      let(:participant) { build(:participant, id: 1, user_id: user.id, parent_id: assignment.id) }
      let(:participant2) { build(:participant, id: 2, user_id: user2.id, parent_id: assignment.id) }
      let(:user) { create(:student) }
    Severity: Minor
    Found in spec/models/student_task_spec.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Class has too many lines. [370/100]
    Open

    class AssignmentForm
      attr_accessor :assignment,
                    :assignment_questionnaires,
                    :due_dates,
                    :tag_prompt_deployments,
    Severity: Minor
    Found in app/models/assignment_form.rb by rubocop

    This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

    Block has too many lines. [308/25]
    Open

    describe CourseAnalytic do
      let(:course) { build(:course, id: 1, name: 'ECE517') }
      let(:participant) { build(:participant, user: build(:student, name: 'Jane', fullname: 'Doe, Jane', id: 1)) }
      let(:participant2) { build(:participant, user: build(:student, name: 'John', fullname: 'Doe, John', id: 2)) }
      let(:participant3) { build(:participant, can_review: false, user: build(:student, name: 'King', fullname: 'Titan, King', id: 3)) }
    Severity: Minor
    Found in spec/models/course_analytic_spec.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [292/25]
    Open

    describe GradesController do
      let(:review_response) { build(:response) }
      let(:assignment) { build(:assignment, id: 1, max_team_size: 2, questionnaires: [review_questionnaire], is_penalty_calculated: true) }
      let(:assignment2) { build(:assignment, id: 2, max_team_size: 2, questionnaires: [review_questionnaire], is_penalty_calculated: true) }
      let(:assignment3) { build(:assignment, id: 3, max_team_size: 0, questionnaires: [review_questionnaire], is_penalty_calculated: true) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [289/25]
    Open

    describe Team do
      let(:assignment) { build(:assignment, id: 1, name: 'no assgt') }
      let(:participant) { build(:participant, user_id: 1) }
      let(:participant2) { build(:participant, user_id: 2) }
      let(:participant3) { build(:participant, user_id: 3) }
    Severity: Minor
    Found in spec/models/team_spec.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [289/25]
    Open

    describe Scoring do
      include Scoring
      let(:assignment_helper) { Class.new { extend AssignmentHelper } }
      let(:questionnaire) { create(:questionnaire, id: 1) }
      let(:question1) { create(:question, questionnaire: questionnaire, weight: 1, id: 1) }
    Severity: Minor
    Found in spec/lib/scoring_spec.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [286/25]
    Open

    describe TeamsUsersController do
      # Including the stubbed objects from the teams_shared.rb file
      include_context 'object initializations'
      # Objects initialization for team users
      let(:teamUser) { build(:team_user, id: 1, team_id: 1, user_id: 1) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [283/25]
    Open

    describe ResponseAnalytic do
      let(:questionnaire) { create(:questionnaire, id: 1) }
      let(:question1) { create(:question, questionnaire: questionnaire, weight: 1, id: 1) }
      let(:response_map) { create(:review_response_map, id: 1, reviewed_object_id: 1) }
      let!(:response_record) { create(:response, id: 1, response_map: response_map) }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Block has too many lines. [279/25]
    Open

        describe '#create and #save' do
          context 'when quiz is valid' do
            before(:each) do
              # create_quiz_questionnaire
              allow_any_instance_of(QuizQuestionnairesController).to receive(:validate_quiz).and_return('valid')

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Severity
    Category
    Status
    Source
    Language