bio-miga/miga

View on GitHub
lib/miga/cli/base.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use snake_case for method names.
Wontfix

    def TASK_DESC
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for method names.
Wontfix

    def EXECS
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for variable names.
Open

  @@EXECS = @@TASK_DESC.keys
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use snake_case for variable names.
Open

  @@TASK_DESC = {
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use snake_case for variable names.
Open

  @@FILE_REGEXP =
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use snake_case for method names.
Wontfix

    def TASK_ALIAS
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for variable names.
Open

  @@TASK_ALIAS = {
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Replace class var @@TASK_ALIAS with a class instance var.
Open

  @@TASK_ALIAS = {
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Replace class var @@TASK_DESC with a class instance var.
Open

  @@TASK_DESC = {
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Use snake_case for method names.
Wontfix

    def FILE_REGEXP(paired = false)
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for variable names.
Wontfix

  @@PAIRED_FILE_REGEXP =
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Missing top-level class documentation comment.
Open

class MiGA::Cli < MiGA::MiGA
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

Replace class var @@FILE_REGEXP with a class instance var.
Open

  @@FILE_REGEXP =
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Missing top-level module documentation comment.
Open

module MiGA::Cli::Base
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

Replace class var @@EXECS with a class instance var.
Open

  @@EXECS = @@TASK_DESC.keys
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Replace class var @@PAIRED_FILE_REGEXP with a class instance var.
Open

  @@PAIRED_FILE_REGEXP =
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Avoid multi-line ternary operators, use if or unless instead.
Open

      (@@TASK_DESC[task] =~ /\(alias: .*\)\./) ?
        @@TASK_DESC[task].sub(/\)\.$/, ", #{nick}).") :
        @@TASK_DESC[task].sub(/\.$/, " (alias: #{nick}).")
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for multi-line ternary op expressions.

Example:

# bad
a = cond ?
  b : c
a = cond ? b :
    c
a = cond ?
    b :
    c

# good
a = cond ? b : c
a =
  if cond
    b
  else
    c
  end

Avoid comma after the last item of a hash.
Open

    tax_distributions: :tax_dist,
Severity: Minor
Found in lib/miga/cli/base.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
]

Avoid comma after the last item of a hash.
Open

    tax_dist:    'Estimate distributions of distance by taxonomy',
Severity: Minor
Found in lib/miga/cli/base.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
]

Omit parentheses for ternary conditions.
Open

      (@@TASK_DESC[task] =~ /\(alias: .*\)\./) ?
        @@TASK_DESC[task].sub(/\)\.$/, ", #{nick}).") :
        @@TASK_DESC[task].sub(/\.$/, " (alias: #{nick}).")
Severity: Minor
Found in lib/miga/cli/base.rb by rubocop

This cop checks for the presence of parentheses around ternary conditions. It is configurable to enforce inclusion or omission of parentheses using EnforcedStyle. Omission is only enforced when removing the parentheses won't cause a different behavior.

Example: EnforcedStyle: requirenoparentheses (default)

# bad
foo = (bar?) ? a : b
foo = (bar.baz?) ? a : b
foo = (bar && baz) ? a : b

# good
foo = bar? ? a : b
foo = bar.baz? ? a : b
foo = bar && baz ? a : b

Example: EnforcedStyle: require_parentheses

# bad
foo = bar? ? a : b
foo = bar.baz? ? a : b
foo = bar && baz ? a : b

# good
foo = (bar?) ? a : b
foo = (bar.baz?) ? a : b
foo = (bar && baz) ? a : b

Example: EnforcedStyle: requireparentheseswhen_complex

# bad
foo = (bar?) ? a : b
foo = (bar.baz?) ? a : b
foo = bar && baz ? a : b

# good
foo = bar? ? a : b
foo = bar.baz? ? a : b
foo = (bar && baz) ? a : b

There are no issues that match your filters.

Category
Status