Showing 612 of 612 total issues
Method has too many lines. [12/10] Open
def self.make_set_localconf_database_settings_command(db,user,password,host='localhost')
cmd1 = "php -r \'define(\"TYPO3_MODE\", \"BE\");" \
"$arr = include \"#{fetch(:typo3_v6_local_conf_path)}\"; " \
"echo \"<?php\\n\";" \
"echo \"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. [12/10] Open
def self.set_v4_localconf_extlist(extList)
extList = Typo3Helper::get_v4_localconf_extlist('extList')
extList_fe = Typo3Helper::get_v4_localconf_extlist('extList_FE')
- 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. [12/10] Open
def self.get_localconf_extlist
if(self.typo3_localconf_version == 6)
confhash = self.get_v6_package_states
activeList = []
confhash['packages'].each do |extKey, extAttr|
- 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 typo3_version_list_for_table is too high. [16.64/15] Open
def self.typo3_version_list_for_table
version_arr = []
idx = 0
versions_list_in = []
versions = Typo3Helper::get_typo3_versions
- 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 set_v4_localconf_extlist is too high. [16.55/15] Open
def self.set_v4_localconf_extlist(extList)
extList = Typo3Helper::get_v4_localconf_extlist('extList')
extList_fe = Typo3Helper::get_v4_localconf_extlist('extList_FE')
- 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 set_v6_localconf_extlist
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.set_v6_localconf_extlist(extList)
outfile = File.join('current','dummy','typo3conf','PackageStates.php')
confhash = self.get_v6_package_states
# require 'pp'
Method create_mysql_base_command_with
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.create_mysql_base_command_with(user,host,password,db,exec='mysql')
Method db_image_list
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.db_image_list
images_arr = []
idx = 0
Dir.glob("#{TYPO3_DB_DUMP_DIR}/*.sql").sort.each {|sql|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method download_typo3_source
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.download_typo3_source version
tarball= "typo3source/typo3_src-#{version}.tar.gz"
unless File.directory?('typo3source')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Line is too long. [124/80] Open
# config.vm.provision "shell", inline: "echo -e '#{File.read("#{Dir.home}/.ssh/id_rsa")}' > '/home/vagrant/.ssh/id_rsa'"
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"]
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
config.vm.provision "shell", inline: $script, run: "always"
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
config.vm.synced_folder ".", "/vagrant", disabled: true
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
spec.add_development_dependency "rake", "~> 10.0"
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Incorrect indentation detected (column 0 instead of 4). Open
# PP.pp confhash
- Read upRead up
- Exclude checks
This cops checks the indentation of comments.
Example:
# bad
# comment here
def method_name
end
# comment here
a = 'hello'
# yet another comment
if true
true
end
# good
# comment here
def method_name
end
# comment here
a = 'hello'
# yet another comment
if true
true
end
Extra empty line detected at class body beginning. Open
def self.typo3_version_list
- Read upRead up
- Exclude checks
This cops checks if empty lines around the bodies of classes match the configuration.
Example: EnforcedStyle: empty_lines
# good
class Foo
def bar
# ...
end
end
Example: EnforcedStyle: emptylinesexcept_namespace
# good
class Foo
class Bar
# ...
end
end
Example: EnforcedStyle: emptylinesspecial
# good
class Foo
def bar; end
end
Example: EnforcedStyle: noemptylines (default)
# good
class Foo
def bar
# ...
end
end
Use 2 (not 4) spaces for indentation. Open
confVars = {}
- Read upRead up
- Exclude checks
This cops checks for indentation that doesn't use the specified number of spaces.
See also the IndentationConsistency cop which is the companion to this one.
Example:
# bad
class A
def test
puts 'hello'
end
end
# good
class A
def test
puts 'hello'
end
end
Example: IgnoredPatterns: ['^\s*module']
# bad
module A
class B
def test
puts 'hello'
end
end
end
# good
module A
class B
def test
puts 'hello'
end
end
end
Missing space after #
. Open
#system("cd current/dummy && ln -sf ../../../typo3source/typo3_src-#{version} typo3_src")
- Read upRead up
- Exclude checks
This cop checks whether comments have a leading space after the
#
denoting the start of the comment. The leading space is not
required for some RDoc special syntax, like #++
, #--
,
#:nodoc
, =begin
- and =end
comments, "shebang" directives,
or rackup options.
Example:
# bad
#Some comment
# good
# Some comment
Space missing after comma. Open
version = altsrc[altsrc.index('typo3_src-')+10,6]
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }