Showing 1,918 of 4,506 total issues
Block has too many lines. [244/25] Open
describe TreeDisplayController do
# Airbrake-1517247902792549741
describe '#list' do
it 'should not redirect if current user is an instructor' do
user = build(:instructor)
- 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. [243/25] Open
describe GradesHelper, type: :helper do
let(:review_response) { build(:response, id: 1, map_id: 1) }
let(:question) { build(:question) }
let(:participant) { build(:participant, id: 1, assignment: assignment, user_id: 1, parent_id: 1) }
let(:team) { build(:assignment_team, 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. [264/100] Open
class ImportFileController < ApplicationController
include AuthorizationHelper
def action_allowed?
current_user_has_ta_privileges?
- 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. [256/100] Open
class TreeDisplayController < ApplicationController
helper :application
include SecurityHelper
include AuthorizationHelper
- 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. [229/25] Open
describe LatePoliciesController do
let(:instructor) { build(:instructor, id: 6) }
before(:each) do
stub_current_user(instructor, instructor.role.name, instructor.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. [228/25] Open
describe TeamsController do
# Performs authorization check for user
include_context 'object initializations'
describe 'action allowed method' 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.
Block has too many lines. [227/25] Open
describe ParticipantsController do
let(:instructor) { build(:instructor, id: 6) }
let(:student) { build(:student) }
let(:student1) { build_stubbed(:student, id: 1, name: 'student') }
let(:course_participant) { build(:course_participant) }
- 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. [227/25] Open
describe 'creation page', js: true do
before(:each) do
(1..3).each do |i|
create(:course, name: "Course #{i}")
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.
Class has too many lines. [248/100] Open
class Response < ApplicationRecord
# Added for E1973. A team review will have a lock on it so only one user at a time may edit it.
include Lockable
include ResponseAnalytic
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. [224/25] Open
describe MentorManagement do
# using let! so that state is automatically set up before each example group
# this could also be accomplished with before(:each) and instance methods
# but the rest of the code base makes use of let a lot, so this is consistent
# with that, while achieving the same goal as before(:each)
- 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. [247/100] Open
class User < ApplicationRecord
enum locale: Locale.code_name_to_db_encoding(Locale.available_locale_preferences)
acts_as_authentic do |config|
config.validates_uniqueness_of_email_field_options = { if: -> { false } } # Don't validate email uniqueness
config.crypto_provider = Authlogic::CryptoProviders::Sha1
- 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. [222/25] Open
describe 'Staggered deadline test' do
before(:each) do
# assignment and topic
create(:assignment,
name: 'Assignment1665',
- 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. [221/25] Open
describe SignUpTopic do
let(:topic) { build(:topic) }
let(:suggestion) { build(:suggestion, id: 1, assignment_id: 1) }
let(:signed_up_team) { build(:signed_up_team) }
let(:team) { create(:assignment_team, id: 1, name: 'team 1', users: [user, user2]) }
- 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. [240/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.
Assignment Branch Condition size for import_from_hash is too high. [141.3/15] 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 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. [236/100] Open
class GradesController < ApplicationController
helper :file
helper :submitted_content
helper :penalty
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.
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) }