Showing 1,937 of 1,937 total issues
Class has too many lines. [253/100] Open
class Configuration
attr_reader :observer, :actions, :timer, :oauth_providers
def initialize
@root = Rails.root
- 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.
Module has too many lines. [118/100] Open
module ApplicationHelper
def title
@title || Houston.config.title
end
- 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. [110/100] Open
class ApplicationController < ActionController::Base
include UrlHelper
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
- 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 Configuration
has 43 methods (exceeds 20 allowed). Consider refactoring. Open
class Configuration
attr_reader :observer, :actions, :timer, :oauth_providers
def initialize
@root = Rails.root
Method has too many lines. [42/10] Open
def define_methods!
concern = ProjectAdapter.const_set(concern_name, Module.new)
concern.extend ActiveSupport::Concern
class_methods = concern.const_set(:ClassMethods, Module.new)
- Read upRead up
- 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 root is too high. [43.22/15] Open
def root(*args)
if args.any?
@root = args.first
# Keep structure.sql in instances' db directory
- 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
Assignment Branch Condition size for daemonize is too high. [39.82/15] Open
def self.daemonize(name)
unless Houston.running_as_web_server? or ENV["HOUSTON_DAEMONS"].to_s.split(",").member?(name)
puts "\e[94m[daemon:#{name}] Skipping daemon since we're not running as a server\e[0m" if Rails.env.development?
Rails.logger.info "\e[94m[daemon:#{name}] Skipping daemon since we're not running as a server\e[0m"
return
- 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
File configuration.rb
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
root = File.expand_path(File.join(File.dirname(__FILE__), "../../.."))
require File.join(root, "lib/hash_dsl")
require File.join(root, "lib/core_ext/hash")
require File.join(root, "lib/core_ext/kernel")
require File.join(root, "lib/core_ext/exception")
Assignment Branch Condition size for score is too high. [37.35/15] Open
def score(label, value, options={})
score_count_class = Array(options.delete(:score_count_class)) << "score-count"
precision = options.delete(:precision)
css = Array(options.fetch(:class, []))
- 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
Assignment Branch Condition size for define_methods! is too high. [36.06/15] Open
def define_methods!
concern = ProjectAdapter.const_set(concern_name, Module.new)
concern.extend ActiveSupport::Concern
class_methods = concern.const_set(:ClassMethods, Module.new)
- 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
Method has too many lines. [30/10] Open
def pack(object)
case object
when Array
object.map { |item| pack(item) }
when Hash
- Read upRead up
- 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.
Method has too many lines. [28/10] Open
def run!
exception = nil
Houston.reconnect do
touch :started_at
- Read upRead up
- 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 mail is too high. [33.54/15] Open
def mail(options={})
options[:from] = format_email_addresses(options[:from]) if options.key?(:from)
options[:to] = format_email_addresses(options[:to]).uniq if options.key?(:to)
options[:cc] = format_email_addresses(options[:cc]).uniq if options.key?(:cc)
options[:bcc] = format_email_addresses(options[:bcc]).uniq if options.key?(:bcc)
- 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
Assignment Branch Condition size for percentile is too high. [33.75/15] Open
def percentile(p)
sorted_array = self.sort
rank = (p.to_f / 100) * (self.length + 1)
return nil if self.length == 0
- 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
Assignment Branch Condition size for policies is too high. [32.76/15] Open
def policies
ext = File.extname(params[:name])
unique_file_name = params.values_at(:name, :size, :type).join(".")
filename = Digest::SHA1.hexdigest(unique_file_name) + ext
object_name = "uploads/#{current_user.id}/#{filename}"
- 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
Method has too many lines. [26/10] Open
def policies
ext = File.extname(params[:name])
unique_file_name = params.values_at(:name, :size, :type).join(".")
filename = Digest::SHA1.hexdigest(unique_file_name) + ext
object_name = "uploads/#{current_user.id}/#{filename}"
- Read upRead up
- 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.
Method has too many lines. [25/10] Open
def self.daemonize(name)
unless Houston.running_as_web_server? or ENV["HOUSTON_DAEMONS"].to_s.split(",").member?(name)
puts "\e[94m[daemon:#{name}] Skipping daemon since we're not running as a server\e[0m" if Rails.env.development?
Rails.logger.info "\e[94m[daemon:#{name}] Skipping daemon since we're not running as a server\e[0m"
return
- Read upRead up
- 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.
Method has too many lines. [23/10] Open
def _add_white_space(json)
scanner = StringScanner.new(json)
output = ""
indent = 0
until scanner.eos?
- Read upRead up
- 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.
Method has too many lines. [22/10] Open
def score(label, value, options={})
score_count_class = Array(options.delete(:score_count_class)) << "score-count"
precision = options.delete(:precision)
css = Array(options.fetch(:class, []))
- Read upRead up
- 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.
Method has too many lines. [22/10] Open
def root(*args)
if args.any?
@root = args.first
# Keep structure.sql in instances' db directory
- Read upRead up
- 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.