Showing 4,506 of 4,506 total issues
Class has too many lines. [126/100] Open
class CoursesController < ApplicationController
include AuthorizationHelper
autocomplete :user, :name
require 'fileutils'
- 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. [125/100] Open
class StudentTeamsController < 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.
Block has too many lines. [138/25] Open
describe MarkupStylesController do
let(:super_admin) { build(:superadmin, id: 1, role_id: 5) }
let(:student) { build(:student, id: 1, role_id: 1) }
let(:student_role) { build(:role_of_student, id: 1, name: 'Student_role_test', description: '', parent_id: nil, default_page_id: nil) }
let(:instructor_role) { build(:role_of_instructor, id: 2, name: 'Instructor_role_test', description: '', parent_id: nil, default_page_id: nil) }
- 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. [137/25] Open
describe InvitationsController do
let(:instructor) { build(:instructor, id: 6) }
let(:student) { build(:student, parent_id: 2, id: 1) }
let(:student1) { build(:student, id: 2) }
let(:admin) { build(:admin) }
- 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.
Assignment Branch Condition size for automatic_review_mapping is too high. [83.92/15] Open
def automatic_review_mapping
assignment_id = params[:id].to_i
assignment = Assignment.find(params[:id])
participants = AssignmentParticipant.where(parent_id: params[:id].to_i).to_a.select(&:can_review).shuffle!
teams = AssignmentTeam.where(parent_id: params[:id].to_i).to_a.shuffle!
- 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
Class has too many lines. [121/100] Open
class Participant < ApplicationRecord
include Scoring
include ParticipantsHelper
has_paper_trail
belongs_to :user
- 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. [121/100] Open
class Checkbox < UnscoredQuestion
include ActionView::Helpers
# This method returns what to display if an instructor (etc.) is creating or editing a questionnaire (questionnaires_controller.rb)
def edit(count)
html = edit_remove_button(count) + edit_seq(count) + edit_question(count)
- 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. [120/100] Open
class Role < ApplicationRecord
belongs_to :parent, class_name: 'Role', inverse_of: false
has_many :users, inverse_of: false, dependent: :nullify
serialize :cache
- 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. [135/25] Open
describe Menu do
# To test menu, a variety of menu_items must exist.
# role_admin.yml defines the permissionIds for admin as 5,5,6,3,2
# we must assign controlleractions and contentpages
# with permissionIds of those numbers
- 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.
Module has too many lines. [119/100] Open
module AuthorizationHelper
# Notes:
# We use session directly instead of current_role_name and the like
# Because helpers do not seem to have access to the methods defined in app/controllers/application_controller.rb
- 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. [119/100] Open
class InvitationsController < ApplicationController
include AuthorizationHelper
include ConferenceHelper
before_action :check_user_before_invitation, only: [:create]
- 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. [134/25] Open
describe AccountRequestController 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) }
- 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. [134/25] Open
describe DutiesController do
let(:assignment) { build(:assignment, id: 1, course_id: 1, instructor_id: 6, due_dates: [due_date], microtask: true, staggered_deadline: true) }
let(:admin) { build(:admin) }
let(:instructor) { build(:instructor, id: 6) }
let(:instructor2) { build(:instructor, id: 66) }
- 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. [133/25] Open
describe FeedbackResponseMap do
let(:questionnaire1) { build(:questionnaire, id: 1, type: 'AuthorFeedbackQuestionnaire') }
let(:questionnaire2) { build(:questionnaire, id: 2, type: 'MetareviewQuestionnaire') }
let(:participant) { build(:participant, id: 1) }
let(:assignment) { build(: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.
Block has too many lines. [133/25] Open
describe BadgesController do
let(:super_admin) { build(:superadmin, id: 1, role_id: 5) }
let(:admin) { build(:admin, id: 3) }
let(:instructor1) { build(:instructor, id: 10, role_id: 3, parent_id: 3, name: 'Instructor1') }
let(:student1) { build(:student, id: 21, role_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. [116/100] Open
class StudentTaskController < ApplicationController
include AuthorizationHelper
helper :submitted_content
- 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.
Assignment Branch Condition size for create is too high. [80.72/15] Open
def create
@assignment_form = AssignmentForm.new(assignment_form_params)
if params[:button]
# E2138 issue #3
find_existing_assignment = Assignment.find_by(name: @assignment_form.assignment.name, course_id: @assignment_form.assignment.course_id)
- 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
Class has too many lines. [115/100] Open
class QuestionsController < ApplicationController
include AuthorizationHelper
# A question is a single entry within a questionnaire
# Questions provide a way of scoring an object
- 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. [131/25] Open
describe VmQuestionResponse do
let(:review_questionnaire) { build(:questionnaire) }
let(:author_feedback_questionnaire) { AuthorFeedbackQuestionnaire.new }
let(:teammate_review_questionnaire) { TeammateReviewQuestionnaire.new }
let(:metareview_questionnaire) { MetareviewQuestionnaire.new }
- 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. [131/25] Open
describe '#assign_reviewer_dynamically' do
before(:each) do
allow(AssignmentParticipant).to receive_message_chain(:where, :first)
.with(user_id: '1', parent_id: 1).with(no_args).and_return(participant)
end
- 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.