HipByte/codeclimate-rubymotion

View on GitHub
lib/cc/engine/rubymotion.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for run is too high. [17.15/15]
Open

      def run
        Dir.chdir(@directory) do
          Dir["**/*.rb"].each do |path|
            parsed = RuboCop::ProcessedSource.new(File.read(path), path)

Severity: Minor
Found in lib/cc/engine/rubymotion.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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'rubocop'
Severity: Minor
Found in lib/cc/engine/rubymotion.rb 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 class body end.
Open


    end
Severity: Minor
Found in lib/cc/engine/rubymotion.rb by rubocop

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

Space inside parentheses detected.
Open

      def initialize(directory: , io: , engine_config: )
Severity: Minor
Found in lib/cc/engine/rubymotion.rb by rubocop

Checks for spaces inside ordinary round parentheses.

Example:

# bad
f( 3)
g = (a + 3 )

# good
f(3)
g = (a + 3)

Space found before comma.
Open

      def initialize(directory: , io: , engine_config: )
Severity: Minor
Found in lib/cc/engine/rubymotion.rb by rubocop

Checks for comma (,) preceded by space.

Example:

# bad
[1 , 2 , 3]
a(1 , 2)
each { |a , b| }

# good
[1, 2, 3]
a(1, 2)
each { |a, b| }

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'cc/rubymotion_cops'
Severity: Minor
Found in lib/cc/engine/rubymotion.rb 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"

Avoid comma after the last item of a hash.
Open

                      end: violation.location.last_line,
Severity: Minor
Found in lib/cc/engine/rubymotion.rb by rubocop

This cop checks for trailing comma in array and hash literals.

Example: EnforcedStyleForMultiline: consistent_comma

# bad
a = [1, 2,]

# good
a = [
  1, 2,
  3,
]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: comma

# bad
a = [1, 2,]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: no_comma (default)

# bad
a = [1, 2,]

# good
a = [
  1,
  2
]

Space found before comma.
Open

      def initialize(directory: , io: , engine_config: )
Severity: Minor
Found in lib/cc/engine/rubymotion.rb by rubocop

Checks for comma (,) preceded by space.

Example:

# bad
[1 , 2 , 3]
a(1 , 2)
each { |a , b| }

# good
[1, 2, 3]
a(1, 2)
each { |a, b| }

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'json'
Severity: Minor
Found in lib/cc/engine/rubymotion.rb 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"

There are no issues that match your filters.

Category
Status