Showing 661 of 695 total issues
Module has too many lines. [123/100] Open
module VooApi
# There are two primary options hashes:
# - @normalized_options are determined upon initialization and do not change
# after that.
- Read upRead up
- Create a ticketCreate a ticket
- 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.
Module has too many lines. [112/100] Open
module CardClass
def create! opts
card = new opts
card.save!
card
- Read upRead up
- Create a ticketCreate a ticket
- 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. [109/100] Open
class Content < SimpleDelegator
extend Clean
Chunk # trigger autoload
- Read upRead up
- Create a ticketCreate a ticket
- 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. [107/100] Open
class CardSpecLoader
class << self
def init
require "spork"
ENV["RAILS_ENV"] = "test"
- Read upRead up
- Create a ticketCreate a ticket
- 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. [102/100] Open
module Render
# view=open&layout=simple
def render! view, view_options={}
voo = View.new self, view, view_options, @voo
with_voo voo do
- Read upRead up
- Create a ticketCreate a ticket
- 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.
File content_spec.rb
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
RSpec.describe Card::Content do
EXAMPLES = {
nests: {
content: "Some Literals: \\[{I'm not| a link]}, and " \
'\\{{This Card|Is not Nestd}}' \
- Create a ticketCreate a ticket
File director_spec.rb
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
RSpec.describe "Card::Director" do
STAGE_MAP = { VI: :initialize,
VP: :prepare_to_validate,
VV: :validate,
SP: :prepare_to_store,
- Create a ticketCreate a ticket
Assignment Branch Condition size for swap_all_subsequences is too high. [25.4/15] Open
def swap_all_subsequences oldseq, newseq
res = []
i = 0
while i <= num_parts - oldseq.num_parts
# for performance reasons: check first character first then the rest
- Read upRead up
- Create a ticketCreate a ticket
- 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
Method has too many lines. [23/15] Open
def path_to page_name
case page_name
when /the home\s?page/
"/"
when /card (.*) with (.*) layout$/
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class View
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class View
module Options
# VooApi methods let developers use view options dynamically.
module VooApi
# There are two primary options hashes:
- Create a ticketCreate a ticket
Assignment Branch Condition size for path_to is too high. [22.87/15] Open
def path_to page_name
case page_name
when /the home\s?page/
"/"
when /card (.*) with (.*) layout$/
- Read upRead up
- Create a ticketCreate a ticket
- 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
Assignment Branch Condition size for determine_image_size is too high. [19.52/15] Open
def determine_image_size
voo.size =
case
when nest_mode == :closed then closed_size
when voo.size.present? then voo.size.to_sym
- Read upRead up
- Create a ticketCreate a ticket
- 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
Assignment Branch Condition size for help is too high. [19.03/15] Open
def help command="generate"
caller = Cardio::Command.bin_name
puts "Usage:"
puts " #{caller} #{command} GENERATOR [args] [options]".green
puts
- Read upRead up
- Create a ticketCreate a ticket
- 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
Cyclomatic complexity for path_to is too high. [10/6] Open
def path_to page_name
case page_name
when /the home\s?page/
"/"
when /card (.*) with (.*) layout$/
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Assignment Branch Condition size for load_stylesheets is too high. [18/15] Open
def load_stylesheets
add_bs_stylesheet "variables"
add_bs_stylesheet "rfs", subdir: "vendor"
mixin_stylesheets.each { |name| add_bs_stylesheet name, subdir: "mixins" }
main_stylesheets.each { |name| add_bs_stylesheet name }
- Read upRead up
- Create a ticketCreate a ticket
- 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
Cyclomatic complexity for absolutize_contextual_parts is too high. [8/6] Open
def absolutize_contextual_parts context
parts.map do |part|
case part
when /^_user$/i then user_part part
when /^_main$/i then self.class.params[:main_name]
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.
An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.
Method has too many lines. [17/15] Open
def help command="generate"
caller = Cardio::Command.bin_name
puts "Usage:"
puts " #{caller} #{command} GENERATOR [args] [options]".green
puts
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for with_wrapper is too high. [17.38/15] Open
def with_wrapper
if voo.layout.present?
voo.wrap ||= []
layout = voo.layout.to_name.key
# don't wrap twice with modals or overlays
- Read upRead up
- Create a ticketCreate a ticket
- 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
Method has too many lines. [17/15] Open
def scope_of section
case section
when /main card content/
with_or_without_main_frame ".d0-card-content"
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for absolutize_contextual_parts is too high. [16.55/15] Open
def absolutize_contextual_parts context
parts.map do |part|
case part
when /^_user$/i then user_part part
when /^_main$/i then self.class.params[:main_name]
- Read upRead up
- Create a ticketCreate a ticket
- 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