revolter/fastlane-plugin-icon_versioning

View on GitHub

Showing 42 of 44 total issues

Fastlane::Helper::VersionIconHelper#run performs a nil-check
Open

          unless cache[original_icon_path].nil?
            if File.exist?(versioned_icon_path)
              versioned_icon_sha = Digest::SHA2.file(versioned_icon_path).hexdigest

              cached_text_sha = cache[original_icon_path][:text]

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)

Fastlane::Helper::VersionIconHelper#suffix doesn't depend on instance state (maybe move it to another class?)
Open

      def suffix(path, text)

A Utility Function is any instance method that has no dependency on the state of the instance.

Severity
Category
Status
Source
Language