Showing 4,481 of 4,481 total issues
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.
Class has too many lines. [169/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.
File factories.rb
has 678 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)) }
Block has too many lines. [160/25] Open
describe 'Assignment creation page', js: true do
include AssignmentCreationHelper
before(:each) do
create_deadline_types
(1..3).each do |i|
- 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. [153/100] Open
class TeamsController < ApplicationController
include AuthorizationHelper
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.
File assignment_creation_spec.rb
has 632 lines of code (exceeds 250 allowed). Consider refactoring. Open
def questionnaire_options(type)
questionnaires = Questionnaire.where(['private = 0 or instructor_id = ?', session[:user].id]).order('name')
options = []
questionnaires.select { |x| x.type == type }.each do |questionnaire|
options << [questionnaire.name, questionnaire.id]
Class has too many lines. [148/100] Open
class Criterion < ScoredQuestion
include ActionView::Helpers
validates :size, presence: true
# This method returns what to display if an instructor (etc.) is creating or editing a questionnaire (questionnaires_controller.rb)
- 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.
Module has too many lines. [148/100] Open
module GradesHelper
include PenaltyHelper
# Render the title
def accordion_title(last_topic, new_topic)
if last_topic.nil?
- Read upRead up
- Exclude checks
This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [148/100] Open
class SuggestionController < ApplicationController
include AuthorizationHelper
def action_allowed?
case params[:action]
- 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. [154/25] Open
describe ConferenceController do
let(:admin) { build(:admin, id: 3) }
let(:super_admin) { build(:superadmin) }
let(:instructor) { build(:instructor, id: 2) }
let(:instructor1) { build(:instructor, id: 2, timezonepref: 'Eastern Time (US & Canada)') }
- 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. [154/25] Open
describe 'GET #get_folder_contents for TA' do
before(:each) do
@treefolder = TreeFolder.new
@treefolder.parent_id = nil
@treefolder.name = 'Courses'
- 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. [147/100] Open
class Assessment360Controller < ApplicationController
include GradesHelper
include AuthorizationHelper
include Scoring
include PenaltyHelper
- 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 review_mapping_controller_spec.rb
has 625 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rails_helper'
describe ReviewMappingController do
let(:assignment) { double('Assignment', id: 1) }
let(:reviewer) { double('Participant', id: 1, name: 'reviewer') }
let(:review_response_map) do
Assignment Branch Condition size for peer_review_strategy is too high. [95.89/15] Open
def peer_review_strategy(assignment_id, review_strategy, participants_hash)
teams = review_strategy.teams
participants = review_strategy.participants
num_participants = participants.size
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Block has too many lines. [153/25] Open
describe AdvertiseForPartnerController do
# Including the stubbed objects from the teams_shared.rb file
include_context 'object initializations'
let(:team1user1) { build_stubbed(:team_user, id: 1, team: team1, user: student1) }
let(:team1user2) { build_stubbed(:team_user, id: 2, team: team1, user: student2) }
- 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. [145/100] Open
class VmQuestionResponse
attr_reader :name, :rounds, :round, :questionnaire_type, :questionnaire_display_type, :list_of_reviews, :list_of_rows, :list_of_reviewers, :max_score
@questionnaire = nil
@assignment = nil
- 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. [152/25] Open
describe AnswerTagsController do
# factory objects required for "action_allowed" test cases
let(:instructor) { build(:instructor, id: 1) }
let(:student) { build(:student, id: 1) }
let!(:assignment) { create(:assignment, name: 'assignment', directory_path: 'assignment', 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.