bio-miga/miga-gui

View on GitHub
lib/miga/gui.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

require "miga/gui/view"
Severity: Minor
Found in lib/miga/gui.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 single-line method definitions.
Open

  def self.init ; MiGA::GUI::View.init ; end
Severity: Minor
Found in lib/miga/gui.rb by rubocop

This cop checks for single-line method definitions that contain a body. It will accept single-line methods with no body.

Example:

# bad
def some_method; body end
def link_to(url); {:name => url}; end
def @table.columns; super; end

# good
def no_op; end
def self.resource_class=(klass); end
def @table.columns; end

Space found before semicolon.
Open

  def self.init ; MiGA::GUI::View.init ; end
Severity: Minor
Found in lib/miga/gui.rb by rubocop

Checks for semicolon (;) preceded by space.

Example:

# bad
x = 1 ; y = 2

# good
x = 1; y = 2

Trailing whitespace detected.
Open

  
Severity: Minor
Found in lib/miga/gui.rb by rubocop

Use nested module/class definitions instead of compact style.
Open

class MiGA::GUI
Severity: Minor
Found in lib/miga/gui.rb by rubocop

This cop checks the style of children definitions at classes and modules. Basically there are two different styles:

Example: EnforcedStyle: nested (default)

# good
# have each child on its own line
class Foo
  class Bar
  end
end

Example: EnforcedStyle: compact

# good
# combine definitions as much as possible
class Foo::Bar
end

The compact style is only forced for classes/modules with one child.

Extra empty line detected at class body beginning.
Open


  ##
Severity: Minor
Found in lib/miga/gui.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 found before semicolon.
Open

  def self.init ; MiGA::GUI::View.init ; end
Severity: Minor
Found in lib/miga/gui.rb by rubocop

Checks for semicolon (;) preceded by space.

Example:

# bad
x = 1 ; y = 2

# good
x = 1; y = 2

There are no issues that match your filters.

Category
Status