t3labcom/capistrano-typo3

View on GitHub

Showing 612 of 612 total issues

Space missing after comma.
Open

  def self.make_set_localconf_database_settings_command(db,user,password,host='localhost')

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Space missing after comma.
Open

    infile = File.join('current','dummy','typo3conf','PackageStates.php')

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Space after keyword elsif is missing.
Open

    elsif(self.typo3_localconf_version == 6)

Checks the spacing around the keywords.

Example:

# bad
something 'test'do|x|
end

while(something)
end

something = 123if test

# good
something 'test' do |x|
end

while (something)
end

something = 123 if test

Surrounding space missing for operator +.
Open

      return_string << "TYPO3 version: "+ v+ "\n"

Checks that operators have space around them, except for ** which should not have surrounding space.

Example:

# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b

# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b

Do not use spaces inside percent literal delimiters.
Open

    dbsettings =%x[ #{cmd} ].split(' ')

Checks for unnecessary additional spaces inside the delimiters of %i/%w/%x literals.

Example:

# good
%i(foo bar baz)

# bad
%w( foo bar baz )

# bad
%x(  ls -l )

Line is too long. [224/80]
Open

      cmd = "php -r \'define(\"TYPO3_MODE\", \"BE\");$arr = include \"#{TYPO3_V6_LOCAL_CONF_PATH}\";echo \"{$arr[\"DB\"][\"username\"]} {$arr[\"DB\"][\"password\"]} {$arr[\"DB\"][\"host\"]} {$arr[\"DB\"][\"database\"]}\";\'"

%w-literals should be delimited by [ and ].
Open

server 'localhost', roles: %w{web allow_syncfiles allow_syncdatabase}, port: 2222
Severity: Minor
Found in homestead_files/homestead.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Extra empty line detected at block body end.
Open


end
Severity: Minor
Found in homestead_files/Vagrantfile by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

Use the new Ruby 1.9 hash syntax.
Open

        :linux__nfs_options => ['no_root_squash,rw,no_subtree_check']
Severity: Minor
Found in homestead_files/Vagrantfile by rubocop

This cop checks hash literal syntax.

It can enforce either the use of the class hash rocket syntax or the use of the newer Ruby 1.9 syntax (when applicable).

A separate offense is registered for each problematic pair.

The supported styles are:

  • ruby19 - forces use of the 1.9 syntax (e.g. {a: 1}) when hashes have all symbols for keys
  • hash_rockets - forces use of hash rockets for all hashes
  • nomixedkeys - simply checks for hashes with mixed syntaxes
  • ruby19nomixed_keys - forces use of ruby 1.9 syntax and forbids mixed syntax hashes

Example: EnforcedStyle: ruby19 (default)

# bad
{:a => 2}
{b: 1, :c => 2}

# good
{a: 2, b: 1}
{:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
{d: 1, 'e' => 2} # technically not forbidden

Example: EnforcedStyle: hash_rockets

# bad
{a: 1, b: 2}
{c: 1, 'd' => 5}

# good
{:a => 1, :b => 2}

Example: EnforcedStyle: nomixedkeys

# bad
{:a => 1, b: 2}
{c: 1, 'd' => 2}

# good
{:a => 1, :b => 2}
{c: 1, d: 2}

Example: EnforcedStyle: ruby19nomixed_keys

# bad
{:a => 1, :b => 2}
{c: 2, 'd' => 3} # should just use hash rockets

# good
{a: 1, b: 2}
{:c => 3, 'd' => 4}

Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

  unless configuration.has_key?(element)
Severity: Minor
Found in homestead_files/Vagrantfile by rubocop

Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

Example:

# bad
if condition
  do_stuff(bar)
end

unless qux.empty?
  Foo.do_something
end

# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

    v.vmx["memsize"] = MEMORY.to_i
Severity: Minor
Found in homestead_files/Vagrantfile by rubocop

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
Severity: Minor
Found in homestead_files/Vagrantfile by rubocop

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"

Extra empty line detected at method body end.
Open


  end

This cops checks if empty lines exist around the bodies of methods.

Example:

# good

def foo
  # ...
end

# bad

def bar

  # ...

end

Unnecessary spacing detected.
Open

    return  _version_arr.uniq.sort

This cop checks for extra/unnecessary whitespace.

Example:

# good if AllowForAlignment is true
name      = "RuboCop"
# Some comment and an empty line

website  += "/bbatsov/rubocop" unless cond
puts        "rubocop"          if     debug

# bad for any configuration
set_app("RuboCop")
website  = "https://github.com/bbatsov/rubocop"

Use 2 (not 4) spaces for indentation.
Open

      cmd1 = "php -r \'define(\"TYPO3_MODE\", \"BE\");" \

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

Space missing after comma.
Open

          list << sprintf('%02d',line.chomp[19,2])

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Space missing after comma.
Open

  def self.make_set_localconf_database_settings_command(db,user,password,host='localhost')

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Space missing after comma.
Open

    newphpconf.gsub!('stdClass::__set_state(','')

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Space missing after comma.
Open

    system("rm -f #{File.join('current','dummy','typo3_src')}")

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Surrounding space missing for operator =.
Open

    cache_tables= %w(cache_extensions cache_hash cache_imagesizes cache_md5params cache_pages cache_pagesection cache_sys_dmail_stat cache_treelist cache_typo3temp_log cachingframework_cache_hash cachingframework_cache_hash_tags cachingframework_cache_pages cachingframework_cache_pages_tags cachingframework_cache_pagesection cachingframework_cache_pagesection_tags cf_cache_hash cf_cache_hash_tags cf_cache_pages cf_cache_pages_tags cf_cache_pagesection cf_cache_pagesection_tags cf_extbase_object cf_extbase_object_tags cf_extbase_reflection cf_extbase_reflection_tags cf_tt_news_cache cf_tt_news_cache_tags cf_tx_solr cf_tx_solr_tags tt_news_cache tt_news_cache_tags tx_realurl_chashcache tx_realurl_errorlog tx_realurl_pathcache tx_realurl_uniqalias tx_realurl_urldecodecache tx_realurl_urlencodecache tx_solr_cache tx_solr_cache_tags)

Checks that operators have space around them, except for ** which should not have surrounding space.

Example:

# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b

# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Severity
Category
Status
Source
Language