dwhelan/proc_matcher

View on GitHub

Showing 5 of 5 total issues

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

Gem::Specification.new do |gem|
  gem.name          = 'proc_matcher'
  gem.version       = ProcMatcher::VERSION
  gem.authors       = ['Declan Whelan']
  gem.email         = ['dwhelan@leanintuit.com']
Severity: Minor
Found in proc_matcher.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.

Use %i or %I for an array of symbols.
Open

task default: [:spec, :rubocop, :build]
Severity: Minor
Found in Rakefile by rubocop

This cop can check for array literals made up of symbols that are not using the %i() syntax.

Alternatively, it checks for symbol arrays using the %i() syntax on projects which do not want to use that syntax.

Configuration option: MinSize If set, arrays with fewer elements than this value will not trigger the cop. For example, a MinSize of3` will not enforce a style on an array of 2 or fewer elements.

Example: EnforcedStyle: percent (default)

# good
%i[foo bar baz]

# bad
[:foo, :bar, :baz]

Example: EnforcedStyle: brackets

# good
[:foo, :bar, :baz]

# bad
%i[foo bar baz]

Add an empty line after magic comments.
Open

lib = File.expand_path('../lib', __FILE__)
Severity: Minor
Found in proc_matcher.gemspec by rubocop

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Freeze mutable objects assigned to constants.
Open

  VERSION = '0.1.0'
Severity: Minor
Found in lib/proc_matcher/version.rb by rubocop

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

Unnecessary utf-8 encoding comment.
Open

# coding: utf-8
Severity: Minor
Found in proc_matcher.gemspec by rubocop
Severity
Category
Status
Source
Language