dry-rb/dry-core

View on GitHub
dry-core.gemspec

Summary

Maintainability
Test Coverage

Line is too long. [108/100]
Open

  spec.files         = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin)/}) }
Severity: Minor
Found in dry-core.gemspec by rubocop

required_ruby_version (2.1, declared in dry-core.gemspec) and TargetRubyVersion (2.4, declared in .rubocop.yml) should be equal.
Open

  spec.required_ruby_version = '>= 2.1.0'
Severity: Minor
Found in dry-core.gemspec by rubocop

Checks that required_ruby_version of gemspec and TargetRubyVersion of .rubocop.yml are equal. Thereby, RuboCop to perform static analysis working on the version required by gemspec.

Example:

# When `TargetRubyVersion` of .rubocop.yml is `2.3`.

# bad
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.2.0'
end

# bad
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.4.0'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.3.0'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.3'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = ['>= 2.3.0', '< 2.5.0']
end

Use a guard clause instead of wrapping the code inside a conditional expression.
Open

  if spec.respond_to?(:metadata)
Severity: Minor
Found in dry-core.gemspec by rubocop

Use a guard clause instead of wrapping the code inside a conditional expression

Example:

# bad
def test
  if something
    work
  end
end

# good
def test
  return unless something
  work
end

# also good
def test
  work if something
end

# bad
if something
  raise 'exception'
else
  ok
end

# good
raise 'exception' if something
ok

There are no issues that match your filters.

Category
Status