Showing 7,746 of 7,746 total issues
Block has too many lines. [564/25] Open
ActiveRecord::Schema.define(version: 2019_10_31_013911) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
- 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. [289/25] Open
RSpec.describe Person do
describe 'validations' do
subject { build :person }
it { is_expected.to validate_length_of(:state).is_equal_to 2 }
it { is_expected.to validate_uniqueness_of(:icsid).case_insensitive }
- 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. [251/25] Open
RSpec.describe Availability, type: :model do
let(:a_person) { build(:person) }
before(:example) do
Timecop.freeze
- 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. [195/25] Open
RSpec.describe Timecard do
before(:context) do
@cj = create(:person, firstname: 'CJ')
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. [204/100] Open
class Person < ApplicationRecord
has_paper_trail
include Commentable
include Loggable
- 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. [185/25] Open
RSpec.feature 'Event page' do
context 'logged in as an Editor and given an event' do
before(:all) do
sign_in_as('Editor')
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.
Block has too many lines. [183/25] Open
context 'logged in as an Editor and given an event' do
before(:all) do
sign_in_as('Editor')
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.
Block has too many lines. [178/25] Open
context 'where members have differing availabilities' do
before(:each) do
Timecop.freeze
@mrc = create(:department, name: 'Medical Reserve Dept.')
- 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. [168/25] Open
RSpec.feature 'Event page' do
context 'logged in as an Editor and given an event with departments and rank' do
before(:each) do
sign_in_as('Editor')
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.
Block has too many lines. [166/25] Open
scenario 'shows availablity properly' do
# av stands for available, pav stands for partially available
# uav is unavailable
# This person is available at the exact times
av_hero_exactly_ontime = create(:person,
- 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. [166/25] Open
context 'logged in as an Editor and given an event with departments and rank' do
before(:each) do
sign_in_as('Editor')
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.
Block has too many lines. [162/25] Open
RSpec.describe "Events" do
before(:each) do
sign_in_as('Editor')
@department = create(:department)
@template = create(:event, title: "template title", is_template: true, departments: [@department])
- 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. [159/25] Open
RSpec.describe "Person" do
before(:each) { sign_in_as('Editor') }
describe "views" do
before(:each) 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. [157/25] Open
RSpec.describe Event do
describe 'validations' do
subject { create(:event) }
- 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. [156/25] Open
RSpec.describe 'receiving an availability message', type: :request do
let!(:phone) { create(:phone, content: '+11234567890') }
let!(:person) { phone.person }
let(:msg) { { From: phone.content, Body: body } }
- 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.
Function prototype
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
Searcher.prototype = new function() {
// search is performed in chunks of 1000 for non-blocking user input
var CHUNK_SIZE = 1000;
// do not try to find more than 100 results
var MAX_RESULTS = 100;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Block has too many lines. [148/25] Open
RSpec.describe Timecard do
before(:each) do
@cj = create(:person, firstname: 'CJ')
@tc = create(:timecard, person: @cj)
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. [138/100] Open
class Event < ApplicationRecord
has_paper_trail
include Loggable
before_save :calc_duration, :trim_id_code
- 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. [147/25] Open
SimpleForm.setup do |config|
config.error_notification_class = 'alert alert-danger'
config.button_class = 'btn btn-primary'
config.boolean_label_class = 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.
File schema.rb
has 566 lines of code (exceeds 250 allowed). Consider refactoring. Open
ActiveRecord::Schema.define(version: 2019_10_31_013911) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"