leoniv/ass_launcher

View on GitHub

Showing 44 of 44 total issues

File cmd.rb has 721 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'clamp'
module AssLauncher
  # AssLauncher command-line untils
  # @example
  #   $ass-launcher --help
Severity: Major
Found in lib/ass_launcher/cmd.rb - About 1 day to fix

    File cli_def_snippets.rb has 347 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class String
      def snakize
        gsub(/(.)([A-Z])/,'\1_\2').downcase
      end
    end
    Severity: Minor
    Found in bin/lib/dev_helper/cli_def_snippets.rb - About 4 hrs to fix

      File parameters.rb has 320 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module AssLauncher
        module Enterprise
          module Cli
            # 1C Enterprise cli parameters
            # Fuckin 1C have very obscure cli api
      Severity: Minor
      Found in lib/ass_launcher/enterprise/cli/parameters.rb - About 3 hrs to fix

        File connection_string.rb has 312 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        module AssLauncher
          module Support
            # Implement 1C connection string
            # Mixin for connection string classes
            # @note All connection string class have methods for get and set values
        Severity: Minor
        Found in lib/ass_launcher/support/connection_string.rb - About 3 hrs to fix

          File with_creteinfobase_example.rb has 276 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require 'example_helper'
          
          module Examples
            module TroublesWithCreateFileinfobase
              describe "CREATEINFOBASE doesn't check self argument for valid connection string" do
          Severity: Minor
          Found in examples/troubles/with_creteinfobase_example.rb - About 2 hrs to fix

            File shell.rb has 271 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            class String
              require 'shellwords'
              def to_cmd
                if AssLauncher::Support::Platforms.windows?\
                    || AssLauncher::Support::Platforms.cygwin?
            Severity: Minor
            Found in lib/ass_launcher/support/shell.rb - About 2 hrs to fix

              Class CliDefReport has 21 methods (exceeds 20 allowed). Consider refactoring.
              Open

                class CliDefReport
                  module Cmd
                    require 'clamp'
                    class AbstractCommand < Clamp::Command
                      option ['-v', '--version'], 'VERSION',
              Severity: Minor
              Found in bin/lib/dev_helper/cli_def_report.rb - About 2 hrs to fix

                Class BinaryWrapper has 21 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    class BinaryWrapper
                      include AssLauncher::Support::Platforms
                      attr_reader :path
                      V64_FILES = %w{version64.dat version64.txt}
                      # @api public
                Severity: Minor
                Found in lib/ass_launcher/enterprise/binary_wrapper.rb - About 2 hrs to fix

                  Method to_table has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                            def to_table(columns)
                              require 'command_line_reporter'
                              extend CommandLineReporter
                  
                              header title: main_header, width: main_header.length, rule: true,
                  Severity: Minor
                  Found in lib/ass_launcher/cmd.rb - About 1 hr to fix

                    Method initialize has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                              def initialize(name, desc, binary_matcher,
                                             group, modes, parent = nil, **options)
                    Severity: Major
                    Found in lib/ass_launcher/enterprise/cli/parameters.rb - About 50 mins to fix

                      Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                                def initialize(client, mode, version, appiared_only, query, dev_mode)
                      Severity: Minor
                      Found in lib/ass_launcher/cmd.rb - About 45 mins to fix

                        Method new_param has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                  def new_param(klass, name, desc, clients = [], options = {}, &block)
                        Severity: Minor
                        Found in lib/ass_launcher/enterprise/cli/spec_dsl/dsl_helpers.rb - About 45 mins to fix

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                it 'Transform value if value contains escaped double quote char' do
                                  source_string = 'Hello \"World\"'
                          
                                  enterprise = CLIENTS::THICK\
                                    .command :enterprise, ['/C', source_string] do
                          Severity: Minor
                          Found in examples/troubles/with_running_1c_example.rb and 1 other location - About 40 mins to fix
                          examples/troubles/with_running_1c_example.rb on lines 93..106

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                it 'Transform value if value contains double quote char' do
                                  source_string = 'Hello "World"'
                          
                                  enterprise = CLIENTS::THICK\
                                    .command :enterprise, ['/C', source_string] do
                          Severity: Minor
                          Found in examples/troubles/with_running_1c_example.rb and 1 other location - About 40 mins to fix
                          examples/troubles/with_running_1c_example.rb on lines 109..122

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Method eval_width has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                    def eval_width(col, total, r, trim, rows)
                          Severity: Minor
                          Found in lib/ass_launcher/cmd.rb - About 35 mins to fix

                            Method path_twice has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    def path_twice(name, desc, *clients, **options, &block)
                            Severity: Minor
                            Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix

                              Method flag has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      def flag(name, desc, *clients, **options, &block)
                              Severity: Minor
                              Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix

                                Method url has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        def url(name, desc, *clients, **options, &block)
                                Severity: Minor
                                Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix

                                  Method path has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          def path(name, desc, *clients, **options, &block)
                                  Severity: Minor
                                  Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix

                                    Method string has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            def string(name, desc, *clients, **options, &block)
                                    Severity: Minor
                                    Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language