mickfeech/sensu-plugins-systemd

View on GitHub

Showing 2 of 2 total issues

Block has too many lines. [28/25]
Open

Gem::Specification.new do |s|
  s.name                  = 'sensu-plugins-systemd'
  s.version               = SensuPluginsSystemd::Version::VER_STRING
  s.platform              = Gem::Platform::RUBY
  s.authors               = ['mickfeech and contributors']
Severity: Minor
Found in sensu-plugins-systemd.gemspec by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

required_ruby_version (2.3, declared in sensu-plugins-systemd.gemspec) and TargetRubyVersion (2.1, declared in .rubocop.yml) should be equal.
Open

  s.required_ruby_version = '>= 2.3'
Severity: Minor
Found in sensu-plugins-systemd.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
Severity
Category
Status
Source
Language