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
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
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
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
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
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?
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',
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
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,
Method initialize
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, desc, binary_matcher,
group, modes, parent = nil, **options)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(client, mode, version, appiared_only, query, dev_mode)
Method new_param
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def new_param(klass, name, desc, clients = [], options = {}, &block)
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
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method flag
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def flag(name, desc, *clients, **options, &block)
Method eval_width
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def eval_width(col, total, r, trim, rows)
Method path_not_exist
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def path_not_exist(name, desc, *clients, **options, &block)
Method string
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def string(name, desc, *clients, **options, &block)
Method chose
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def chose(name, desc, *clients, **options, &block)
Method url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def url(name, desc, *clients, **options, &block)