Showing 4,497 of 4,497 total issues
Class has too many lines. [235/100] Open
class Team < ApplicationRecord
has_many :teams_users, dependent: :destroy
has_many :users, through: :teams_users
has_many :join_team_requests, dependent: :destroy
has_one :team_node, foreign_key: :node_object_id, dependent: :destroy
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [232/100] Open
class QuizQuestionnairesController < QuestionnairesController
include AuthorizationHelper
# Quiz questionnaire edit option to be allowed for student
def action_allowed?
- Read upRead up
- Exclude checks
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. [212/25] Open
context 'when attributes are not nil and received from Rubrics' do
let(:attributes) { [aq_attributes1, aq_attributes2] }
before(:each) do
allow(assignment_questionnaire1).to receive(:questionnaire_id).and_return(1)
- Read upRead up
- Exclude checks
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. [208/25] Open
describe 'Assignment Topic Suggestion Test' do
before(:each) do
create(:assignment, name: 'Assignment_suggest_topic', allow_suggestions: true)
create_list(:participant, 3)
create(:assignment_node)
- Read upRead up
- Exclude checks
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.
File review_mapping_helper_spec.rb
has 798 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'spec_helper'
require 'rails_helper'
describe ReviewMappingHelper, type: :helper do
let(:team) { build(:assignment_team, id: 1) }
Class has too many lines. [207/100] Open
class QuestionnairesController < ApplicationController
include AuthorizationHelper
before_action [:create_questionnaire, :save], only: [:list]
include QuestionnaireHelper
include QuestionHelper
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [204/100] Open
class UsersController < ApplicationController
include AuthorizationHelper
include ConferenceHelper
autocomplete :user, :name
- Read upRead up
- Exclude checks
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. [192/25] Open
xdescribe 'Team Creation' do
before(:each) do
create(:assignment)
create_list(:participant, 3)
create(:assignment_node)
- Read upRead up
- Exclude checks
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. [199/100] Open
class ParticipantsController < ApplicationController
include AuthorizationHelper
include ParticipantsHelper
autocomplete :user, :name
- Read upRead up
- Exclude checks
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. [190/25] Open
describe 'topic_suggestion' do
it 'Instructor set an assignment which allow student suggest topic and register student2065' do
# login as student2065, Note by Xing Pan: modify spec/factories/factories.rb to generate student11 and call "create student" at beginning
user = User.find_by(name: 'student2064')
# stub_current_user(user, user.role.name, user.role)
- Read upRead up
- Exclude checks
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. [189/25] Open
describe '#create' do
context 'when user is added to assignment or course team' do
it 'it throws error when user is not defined' do
allow(User).to receive(:find_by).with(name: 'instructor6').and_return(nil)
allow(Team).to receive(:find).with('1').and_return(team1)
- Read upRead up
- Exclude checks
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. [188/25] Open
context 'when attributes are not nil and received from Topics tab' do
let(:attributes) { [aq_attributes1, aq_attributes2] }
before(:each) do
allow(assignment_questionnaire1).to receive(:questionnaire_id).and_return(1)
- Read upRead up
- Exclude checks
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.
File assignment_form_spec.rb
has 740 lines of code (exceeds 250 allowed). Consider refactoring. Open
describe AssignmentForm do
let(:assignment) { build(:assignment, id: 1) }
let(:due_date) { build(:assignment_due_date) }
let(:assignment_form) { AssignmentForm.new }
let(:user) { double('Instructor', timezonepref: 'Eastern Time (US & Canada)') }
Class has too many lines. [190/100] Open
class ReviewResponseMap < ResponseMap
belongs_to :reviewee, class_name: 'Team', foreign_key: 'reviewee_id', inverse_of: false
belongs_to :contributor, class_name: 'Team', foreign_key: 'reviewee_id', inverse_of: false
belongs_to :assignment, class_name: 'Assignment', foreign_key: 'reviewed_object_id', inverse_of: false
- Read upRead up
- Exclude checks
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. [182/25] Open
xdescribe 'SimiCheckWebservice' do
def poll(comp_id)
is_success = false
until is_success
begin
- Read upRead up
- Exclude checks
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.
File sign_up_sheet_controller_spec.rb
has 723 lines of code (exceeds 250 allowed). Consider refactoring. Open
describe SignUpSheetController do
let(:assignment) { build(:assignment, id: 1, instructor_id: 6, due_dates: [due_date], microtask: true, staggered_deadline: true, directory_path: 'assignment') }
let(:assignment2) { create(:assignment, id: 2, microtask: false, staggered_deadline: false, private: true, directory_path: 'assignment2') }
let(:assignment3) { create(:assignment, id: 3, microtask: true, staggered_deadline: true, private: false, directory_path: 'assignment3') }
let(:assignment30) { create(:assignment, id: 30, microtask: true, staggered_deadline: false, private: true, directory_path: 'assignment30') }
Class has too many lines. [186/100] Open
class AssignmentTeam < Team
require File.dirname(__FILE__) + '/analytic/assignment_team_analytic'
include AssignmentTeamAnalytic
include Scoring
- Read upRead up
- Exclude checks
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. [181/25] Open
describe '#delete_all_selected_topics' do
it 'delete_all_selected_topics with staggered deadline true and redirects to edit assignment page with single topic as input' do
allow(SignUpTopic).to receive(:find).with(assignment_id: 1, topic_identifier: ['E1732']).and_return(topic)
request_params = { assignment_id: 1, topic_ids: ['E1732'] }
post :delete_all_selected_topics, params: request_params
- Read upRead up
- Exclude checks
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.
Method has too many lines. [108/10] Open
def import_from_hash(session, params)
if (params[:model] == 'AssignmentTeam') || (params[:model] == 'CourseTeam')
contents_hash = eval(params[:contents_hash])
@header_integrated_body = hash_rows_with_headers(contents_hash[:header], contents_hash[:body])
errors = []
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Block has too many lines. [178/25] Open
describe TagPromptDeployment do
let(:tag_dep) { TagPromptDeployment.new id: 1, tag_prompt: tp, tag_prompt_id: 1, question_type: 'Criterion', answer_length_threshold: 5, questionnaire: questionnaire, assignment: assignment }
let(:tag_dep1) { TagPromptDeployment.new id: 1, tag_prompt: tp, tag_prompt_id: 1, question_type: 'Criterion', answer_length_threshold: nil, assignment_id: 1, assignment: assignment, questionnaire: questionnaire }
let(:tp) { TagPrompt.new(prompt: 'test prompt', desc: 'test desc', control_type: 'Checkbox') }
let(:team) { Team.new(id: 1) }
- Read upRead up
- Exclude checks
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.