Showing 4,497 of 4,497 total issues
Block has too many lines. [152/25] Open
describe CoursesController do
let(:instructor) { build(:instructor, id: 6) }
let(:instructor2) { build(:instructor, id:6666)}
let(:student) { build(:student) }
let(:course) { double('Course', instructor_id: 6, path: '/cscs', name: 'abc') }
- 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. [143/100] Open
class SimiCheckWebService
@@api_key = PLAGIARISM_CHECKER_CONFIG['simicheck_api_key']
@@base_uri = 'https://www.simicheck.com/api'
############################################
# Comparison Operations
- 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. [143/100] Open
class MenuItemsController < ApplicationController
def action_allowed?
case params[:action]
when 'link'
true
- 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. [149/25] Open
describe LotteryController do
let(:assignment) { create(:assignment, is_intelligent: true, name: 'assignment', directory_path: 'assignment') }
let(:assignment_2) { create(:assignment, is_intelligent: false, name: 'assignment_2', directory_path: 'assignment_2') }
let(:student1) { create(:student, name: 'student1') }
- 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. [149/25] Open
describe JoinTeamRequestsController do
# Including the stubbed objects from the teams_shared.rb file
include_context 'object initializations'
# Including the shared method from the teams_shared.rb file
include_context 'authorization check'
- 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. [139/100] Open
class SignUpSheet < ApplicationRecord
# Team lazy initialization method [zhewei, 06/27/2015]
def self.signup_team(assignment_id, user_id, topic_id = nil)
users_team = SignedUpTeam.find_team_users(assignment_id, user_id)
if users_team.empty?
- 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. [138/100] Open
class ApplicationController < ActionController::Base
include AccessHelper
# You want to get exceptions in development, but not in production.
unless Rails.application.config.consider_all_requests_local
- 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 edit is too high. [91.25/15] Open
def edit
quiz_question_choices = QuizQuestionChoice.where(question_id: id)
html = '<tr><td>'
html += '<textarea cols="100" name="question[' + id.to_s + '][txt]" '
- 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. [147/25] Open
describe Participant do
let(:team) { build(:assignment_team, id: 1, name: 'myTeam') }
let(:user) { build(:student, id: 4, name: 'no name', fullname: 'no two') }
let(:team_user) { build(:team_user, id: 1, user: user, team: team) }
let(:topic) { build(:topic) }
- 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 edit is too high. [90.14/15] Open
def edit(_count)
html = '<td align="center"><a rel="nofollow" data-method="delete" href="/questions/' + id.to_s + '">Remove</a></td>'
html += '<td><input size="6" value="' + seq.to_s + '" name="question[' + id.to_s + '][seq]"'
html += ' id="question_' + id.to_s + '_seq" type="text"></td>'
- 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. [145/25] Open
describe InstitutionController do
let(:admin) { build(:admin) }
let(:instructor) { build(:instructor, id: 6) }
let(:instructor2) { build(:instructor, id: 66) }
let(:ta) { build(:teaching_assistant, id: 8) }
- 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. [145/25] Open
describe StudentTeamsController do
# Including the stubbed objects from the teams_shared.rb file
include_context 'object initializations'
# Including the shared method from the teams_shared.rb file
include_context 'authorization check'
- 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. [133/100] Open
class AssignmentParticipant < Participant
belongs_to :assignment, class_name: 'Assignment', foreign_key: 'parent_id'
has_many :review_mappings, class_name: 'ReviewResponseMap', foreign_key: 'reviewee_id'
has_many :response_maps, foreign_key: 'reviewee_id'
has_many :quiz_mappings, class_name: 'QuizResponseMap', foreign_key: 'reviewee_id'
- 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. [144/25] Open
describe PublishingController 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.
Assignment Branch Condition size for hash_rows_with_headers is too high. [88.67/15] Open
def hash_rows_with_headers(header, body)
new_body = []
if (params[:model] == 'User') || (params[:model] == 'AssignmentParticipant') || (params[:model] == 'CourseParticipant') || (params[:model] == 'SignUpTopic')
header.map! { |str| str.strip.downcase.gsub(/\s+/, "").to_sym }
body.each do |row|
- 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. [130/100] Open
class LatePoliciesController < ApplicationController
include AuthorizationHelper
# This method checks the privileges of the current user to perform a certain action.
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. [142/25] Open
describe AdviceController do
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) }
- 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. [141/25] Open
describe MenuItem do
###
# Use factories to `build` necessary objects.
# Please avoid duplicated code as much as you can by moving the code to `before(:each)` block or separated methods.
# RSpec tutorial video (until 9:32): https://youtu.be/dzkVfaKChSU?t=35s
- 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 scale_criterion_question is too high. [86.18/15] Open
def scale_criterion_question(count, answer = nil, questionnaire_min, questionnaire_max)
if size.nil? || size.blank?
cols = '70'
rows = '1'
else
- 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. [127/100] Open
class AccountRequestController < ApplicationController
include AuthorizationHelper
autocomplete :user, :name
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify method: :post, only: %i[destroy create update],
- 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.