revolter/fastlane-plugin-icon_versioning

View on GitHub

Showing 42 of 44 total issues

Fastlane::Actions::IconVersioningAction has no descriptive comment
Open

    class IconVersioningAction < VersionIconAction

Classes and modules are the units of reuse and release. It is therefore considered good practice to annotate every class and module with a brief comment outlining its responsibilities.

Example

Given

class Dummy
  # Do things...
end

Reek would emit the following warning:

test.rb -- 1 warning:
  [1]:Dummy has no descriptive comment (IrresponsibleModule)

Fixing this is simple - just an explaining comment:

# The Dummy class is responsible for ...
class Dummy
  # Do things...
end

Fastlane::Helper::VersionIconHelper#run calls 'Digest::SHA2.file(versioned_icon_path)' 2 times
Open

              versioned_icon_sha = Digest::SHA2.file(versioned_icon_path).hexdigest

              cached_text_sha = cache[original_icon_path][:text]
              cached_icon_sha = cache[original_icon_path][:icon]

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#run calls 'self.class' 2 times
Open

        versioned_appiconset_path = self.class.get_versioned_path(@appiconset_path, @versioned_appiconset_suffix)

        Dir.mkdir(versioned_appiconset_path) unless Dir.exist?(versioned_appiconset_path)

        cache_file_path = File.join(versioned_appiconset_path, CACHE_FILE_NAME)

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << '-composite'' 3 times
Open

          convert << '-composite'
          convert << temp_icon_path
        end

        File.delete(blurred_icon_path, mask_icon_path)

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << '-draw'' 2 times
Open

          convert << '-draw' << "rectangle 0, #{band_top_position}, #{image_width}, #{image_height}"
          convert << mask_icon_path
        end

        MiniMagick::Tool::Convert.new do |convert|

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Actions::VersionIconAction has no descriptive comment
Open

    class VersionIconAction < Action

Classes and modules are the units of reuse and release. It is therefore considered good practice to annotate every class and module with a brief comment outlining its responsibilities.

Example

Given

class Dummy
  # Do things...
end

Reek would emit the following warning:

test.rb -- 1 warning:
  [1]:Dummy has no descriptive comment (IrresponsibleModule)

Fixing this is simple - just an explaining comment:

# The Dummy class is responsible for ...
class Dummy
  # Do things...
end

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << '-geometry'' 2 times
Open

          convert << '-geometry' << "+0+#{band_top_position}"
          convert << '-composite'
          convert << text_icon_path
          convert << '-geometry' << "+#{text_left_margin}+#{band_top_position + text_top_margin}"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#initialize calls 'text_margins_percentages.length' 2 times
Open

        text_margins_percentages *= 4 if text_margins_percentages.length == 1
        text_margins_percentages *= 2 if text_margins_percentages.length == 2

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << text_base_icon_path' 2 times
Open

          convert << text_base_icon_path
        end

        MiniMagick::Tool::Convert.new do |convert|
          convert << '-background' << 'none'

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << text_icon_path' 2 times
Open

          convert << text_icon_path
        end

        MiniMagick::Tool::Convert.new do |convert|
          convert << original_icon_path

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#run calls 'Digest::SHA2.file(versioned_icon_path).hexdigest' 2 times
Open

              versioned_icon_sha = Digest::SHA2.file(versioned_icon_path).hexdigest

              cached_text_sha = cache[original_icon_path][:text]
              cached_icon_sha = cache[original_icon_path][:icon]

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Actions::VersionIconAction#self.available_options calls 'value.any?' 2 times
Open

              UI.user_error!('At least one margin percentage is less than 0') if value.any? { |percentage| percentage < 0 }
              UI.user_error!('At least one margin percentage is greater than 1') if value.any? { |percentage| percentage > 1 }

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane has no descriptive comment
Open

module Fastlane

Classes and modules are the units of reuse and release. It is therefore considered good practice to annotate every class and module with a brief comment outlining its responsibilities.

Example

Given

class Dummy
  # Do things...
end

Reek would emit the following warning:

test.rb -- 1 warning:
  [1]:Dummy has no descriptive comment (IrresponsibleModule)

Fixing this is simple - just an explaining comment:

# The Dummy class is responsible for ...
class Dummy
  # Do things...
end

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << original_icon_path' 2 times
Open

          convert << original_icon_path
          convert << '-blur' << "#{band_blur_radius}x#{band_blur_sigma}"
          convert << blurred_icon_path
        end

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#run calls 'cache[original_icon_path]' 5 times
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]

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << mask_icon_path' 2 times
Open

          convert << mask_icon_path
        end

        MiniMagick::Tool::Convert.new do |convert|
          convert << '-size' << "#{image_width}x#{band_height}"

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << '-size'' 2 times
Open

          convert << '-size' << "#{image_width}x#{band_height}"
          convert << 'xc:none'
          convert << '-fill' << 'rgba(0, 0, 0, 0.2)'
          convert << '-draw' << "rectangle 0, 0, #{image_width}, #{band_height}"
          convert << text_base_icon_path

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::IconVersioning has no descriptive comment
Open

  module IconVersioning
Severity: Minor
Found in lib/fastlane/plugin/icon_versioning.rb by reek

Classes and modules are the units of reuse and release. It is therefore considered good practice to annotate every class and module with a brief comment outlining its responsibilities.

Example

Given

class Dummy
  # Do things...
end

Reek would emit the following warning:

test.rb -- 1 warning:
  [1]:Dummy has no descriptive comment (IrresponsibleModule)

Fixing this is simple - just an explaining comment:

# The Dummy class is responsible for ...
class Dummy
  # Do things...
end

Fastlane::Actions::VersionIconAction#self.available_options calls 'value < 0' 3 times
Open

              UI.user_error!('Band height percentage is less than 0') if value < 0
              UI.user_error!('Band height percentage is greater than 1') if value > 1
            end,
            optional: true,
            type: Float

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Fastlane::Helper::VersionIconHelper#version_icon calls 'convert << temp_icon_path' 2 times
Open

          convert << temp_icon_path
        end

        File.delete(blurred_icon_path, mask_icon_path)

Duplication occurs when two fragments of code look nearly identical, or when two fragments of code have nearly identical effects at some conceptual level.

Reek implements a check for Duplicate Method Call.

Example

Here's a very much simplified and contrived example. The following method will report a warning:

def double_thing()
  @other.thing + @other.thing
end

One quick approach to silence Reek would be to refactor the code thus:

def double_thing()
  thing = @other.thing
  thing + thing
end

A slightly different approach would be to replace all calls of double_thing by calls to @other.double_thing:

class Other
  def double_thing()
    thing + thing
  end
end

The approach you take will depend on balancing other factors in your code.

Severity
Category
Status
Source
Language