Showing 1,919 of 4,502 total issues
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. [203/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.
File sign_up_sheet_controller_spec.rb
has 747 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') }
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.
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.
Class has too many lines. [176/100] Open
class ReputationWebServiceController < ApplicationController
include AuthorizationHelper
# Method: action_allowed
# This method checks if the currently authenticated user has the authorization
- 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.
File factories.rb
has 683 lines of code (exceeds 250 allowed). Consider refactoring. Open
FactoryBot.define do
factory :institution, class: Institution do
name 'North Carolina State University'
end
Block has too many lines. [166/25] Open
describe AdminController do
let(:admin1) { build(:admin, id: 3, role_id: 4, parent_id: 1, name: 'Administrator1') }
let(:admin2) { build(:admin, id: 4, role_id: 4, parent_id: 1, name: 'Administrator2') }
let(:super_admin) { build(:superadmin, id: 1, role_id: 5) }
let(:instructor1) { build(:instructor, id: 10, role_id: 3, parent_id: 3, name: 'Instructor1') }
- 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. [165/25] Open
describe QuestionnaireAnalytic do
let(:question) { Criterion.new(id: 1, weight: 2, break_before: true) }
let(:question2) { TextArea.new(id: 1, weight: 2, break_before: true) }
let(:question3) { TextArea.new(id: 2, weight: 2, break_before: true) }
describe '#types' do
- 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_spec.rb
has 659 lines of code (exceeds 250 allowed). Consider refactoring. Open
describe Assignment do
let(:assignment) { build(:assignment, id: 1, name: 'no assignment', participants: [participant], teams: [team], max_team_size: 2) }
let(:instructor) { build(:instructor, id: 6) }
let(:student) { build(:student, id: 3, name: 'no one') }
let(:review_response_map) { build(:review_response_map, response: [response], reviewer: build(:participant), reviewee: build(:assignment_team)) }