Showing 676 of 676 total issues
Assignment Branch Condition size for start is too high. [33.56/15] Open
def start
Celluloid.boot unless Celluloid.running?
@supervisor = Celluloid::SupervisionGroup.run!
# Start the web server ###################################################
- 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. [64/25] Open
describe '.start' do
subject { manager.start(:host, :port) }
let(:celluloid_fascade) { mock }
before 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. [64/25] Open
describe Gitdocs::SettingsApp do
include Rack::Test::Methods
def app
Gitdocs::SettingsApp
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.
File repository_path_test.rb
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
require File.expand_path('../test_helper', __FILE__)
describe Gitdocs::Repository::Path do
let(:path) { Gitdocs::Repository::Path.new(repository, "/#{relative_path}") }
let(:repository) { stub(root: GitFactory.expand_path(:local)) }
Class Repository
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class Repository
attr_reader :invalid_reason
class InvalidError < StandardError; end
class FetchError < StandardError; end
Block has too many lines. [61/25] Open
describe 'log wrappers' do
let(:logger) { stubs('Logger') }
before do
Gitdocs::Initializer.stubs(:foreground).returns(foreground)
- 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. [60/25] Open
describe 'simple show' do
describe 'directory' do
before do
repository_path.stubs(
directory?: directory,
- 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 browser_app_test.rb
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
ENV['RACK_ENV'] = 'test'
require File.expand_path('../test_helper', __FILE__)
require 'rack/test'
describe Gitdocs::BrowserApp do
Assignment Branch Condition size for mark_conflicts is too high. [28.48/15] Open
def mark_conflicts
# assert(@rugged.index.conflicts?)
# Collect all the index entries by their paths.
index_path_entries = Hash.new { |h, k| h[k] = [] }
- 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. [59/25] Open
describe Gitdocs::Search do
describe '.search' do
subject { Gitdocs::Search.search(:term) }
before do
Gitdocs::Share.stubs(:all).returns([:share1, :share2])
- 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 before_setup is too high. [24.27/15] Open
def before_setup
clean_current_directory
# HACK: In order to ensure that rugged/libgit2 see the expected HOME
# directory we must set it before requiring rugged. This seems to occur
- 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 start is too high. [21.12/15] Open
def start(host, port)
Gitdocs.log_info("Starting Gitdocs v#{VERSION}...")
Gitdocs.log_info(
"Using configuration root: '#{Initializer.root_dirname}'"
)
- 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. [49/25] Open
Gem::Specification.new do |s|
s.name = 'gitdocs'
s.version = Gitdocs::VERSION
s.authors = ['Josh Hull', 'Nathan Esquenazi']
s.email = ['joshbuddy@gmail.com', 'nesquena@gmail.com']
- 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. [49/25] Open
describe 'public methods' do
let(:notifier) { mock }
before { Gitdocs::Notifier.stubs(:instance).returns(notifier) }
describe '.info' 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.
Assignment Branch Condition size for merge is too high. [20.98/15] Open
def merge
return nil unless valid?
return :no_remote unless remote?
return :ok unless remote_oid
return :ok if remote_oid == current_oid
- 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. [47/25] Open
describe '#fetch' do
subject { repository.fetch }
describe 'when invalid' do
let(:path_or_share) { 'tmp/unit/missing' }
- 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 start is too high. [19.34/15] Open
def start
unless stopped?
say 'Gitdocs is already running, please use restart', :red
return
end
- 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. [46/25] Open
describe '#commit' do
subject { committer.commit }
before { Gitdocs.stubs(:log_debug) }
- 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 status is too high. [18.14/15] Open
def status
say "GitDoc v#{VERSION}"
say "Running: #{running?}"
say "File System Watch Method: #{Gitdocs::Manager.listen_method}"
say 'Watched repositories:'
- 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. [45/25] Open
describe '#synchronize' do
subject { repository.synchronize(type) }
describe 'invalid repository' do
let(:type) { :noop }
- 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.