nesquena/gitdocs

View on GitHub

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 ###################################################
Severity: Minor
Found in lib/gitdocs/celluloid_facade.rb by rubocop

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
Severity: Minor
Found in test/unit/manager_test.rb by rubocop

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
Severity: Minor
Found in test/unit/settings_app_test.rb by rubocop

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)) }
Severity: Minor
Found in test/unit/repository_path_test.rb - About 3 hrs to fix

    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
    Severity: Minor
    Found in lib/gitdocs/repository.rb - About 3 hrs to fix

      Block has too many lines. [61/25]
      Open

        describe 'log wrappers' do
          let(:logger) { stubs('Logger') }
      
          before do
            Gitdocs::Initializer.stubs(:foreground).returns(foreground)
      Severity: Minor
      Found in test/unit/gitdocs_test.rb by rubocop

      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,
      Severity: Minor
      Found in test/unit/browser_app_test.rb by rubocop

      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
      Severity: Minor
      Found in test/unit/browser_app_test.rb - About 3 hrs to fix

        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] = [] }
        Severity: Minor
        Found in lib/gitdocs/repository.rb by rubocop

        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])
        Severity: Minor
        Found in test/unit/search_test.rb by rubocop

        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
        Severity: Minor
        Found in test/integration/test_helper.rb by rubocop

        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}'"
              )
        Severity: Minor
        Found in lib/gitdocs/manager.rb by rubocop

        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']
        Severity: Minor
        Found in gitdocs.gemspec by rubocop

        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
        Severity: Minor
        Found in test/unit/notifier_test.rb by rubocop

        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
        Severity: Minor
        Found in lib/gitdocs/repository.rb by rubocop

        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' }
        Severity: Minor
        Found in test/unit/repository_test.rb by rubocop

        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
        Severity: Minor
        Found in lib/gitdocs/cli.rb by rubocop

        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) }
        
        

        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:'
        Severity: Minor
        Found in lib/gitdocs/cli.rb by rubocop

        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 }
        Severity: Minor
        Found in test/unit/repository_test.rb by rubocop

        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.

        Severity
        Category
        Status
        Source
        Language