darrenleeweber/app_version_tasks

View on GitHub
lib/app_version_tasks/semantic_version.rb

Summary

Maintainability
A
0 mins
Test Coverage

AppVersionTasks::SemanticVersion has at least 17 methods
Open

  class SemanticVersion

Too Many Methods is a special case of LargeClass.

Example

Given this configuration

TooManyMethods:
  max_methods: 3

and this code:

class TooManyMethods
  def one; end
  def two; end
  def three; end
  def four; end
end

Reek would emit the following warning:

test.rb -- 1 warning:
  [1]:TooManyMethods has at least 4 methods (TooManyMethods)

AppVersionTasks::SemanticVersion#git_release_branch? performs a nil-check
Open

        !response.match(/y/i).nil?

A NilCheck is a type check. Failures of NilCheck violate the "tell, don't ask" principle.

Additionally, type checks often mask bigger problems in your source code like not using OOP and / or polymorphism when you should.

Example

Given

class Klass
  def nil_checker(argument)
    if argument.nil?
      puts "argument isn't nil!"
    end
  end
end

Reek would emit the following warning:

test.rb -- 1 warning:
  [3]:Klass#nil_checker performs a nil-check. (NilCheck)

There are no issues that match your filters.

Category
Status