Trevoke/SGFParser

View on GitHub
Rakefile

Summary

Maintainability
Test Coverage

Line is too long. [307/80]
Open

  raise ArgumentError, "There are more than one line in version.rb which assign a value to VERSION. This is almost certainly a mistake. At the very least, I have no idea what I'm supposed to do. You must either increment the version manually in the file, or change the file so it only assigns VERSION once."
Severity: Minor
Found in Rakefile by rubocop

Rename is_line_with_version_assignment? to line_with_version_assignment?.
Open

def is_line_with_version_assignment?(line)
Severity: Minor
Found in Rakefile by rubocop

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Avoid the use of double negation (!!).
Open

  !!(line[VERSION_ASSIGNMENT_REGEXP])
Severity: Minor
Found in Rakefile by rubocop

This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

Example:

# bad
!!something

# good
!something.nil?

Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

Line is too long. [85/80]
Open

    is_line_with_version_assignment?(line) ? %(  VERSION = "#{new_version}"\n) : line
Severity: Minor
Found in Rakefile by rubocop

Line is too long. [99/80]
Open

  raise ArgumentError, 'I did not find anything in the version file matching a version assignment.'
Severity: Minor
Found in Rakefile by rubocop

Line is too long. [178/80]
Open

  raise ArgumentError, 'There are two files called version.rb and I do not know which one to use. Override the version_file method in your Rakefile and provide the correct path.'
Severity: Minor
Found in Rakefile by rubocop

Line is too long. [106/80]
Open

  array_of_value_versions = lines_of_version_file.grep(VERSION_ASSIGNMENT_REGEXP) { Regexp.last_match(1) }
Severity: Minor
Found in Rakefile by rubocop

Do not freeze immutable objects, as freezing them has no effect.
Open

VERSION_ASSIGNMENT_REGEXP = /\A\s*?VERSION\s*?=\s*?['"](.*?)['"]\s*?\z/mx.freeze
Severity: Minor
Found in Rakefile by rubocop

This cop check for uses of Object#freeze on immutable objects.

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

There are no issues that match your filters.

Category
Status