decko-commons/decko

View on GitHub
card/lib/card/set/i18n_scanner.rb

Summary

Maintainability
A
0 mins
Test Coverage

Missing top-level class documentation comment.
Open

    class I18nScanner < ::I18n::Tasks::Scanners::FileScanner
Severity: Minor
Found in card/lib/card/set/i18n_scanner.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

Missing top-level module documentation comment.
Open

  module Set
Severity: Minor
Found in card/lib/card/set/i18n_scanner.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

Do not use prefix _ for a variable that is used.
Open

        text.scan(/[^\w._-]tr[( ]\s*["':](\w+)/).map do |_match|
Severity: Minor
Found in card/lib/card/set/i18n_scanner.rb by rubocop

This cop checks for underscore-prefixed variables that are actually used.

Example:

# bad

[1, 2, 3].each do |_num|
  do_something(_num)
end

Example:

# good

[1, 2, 3].each do |num|
  do_something(num)
end

Example:

# good

[1, 2, 3].each do |_num|
  do_something # not using `_num`
end

There are no issues that match your filters.

Category
Status