Sha256: 3b4c8123308697fd3624f5dab87e46bb46050be4c9a9c5072d7cf40f512ae33b

Contents?: true

Size: 913 Bytes

Versions: 30

Compression:

Stored size: 913 Bytes

Contents

# frozen_string_literal: true
require "theme_check"

module Theme
  class Command
    class Check < ShopifyCLI::Command::SubCommand
      recommend_default_ruby_range

      class Options < ShopifyCLI::Options
        def initialize(theme_check)
          super()
          @theme_check = theme_check
        end

        def parse(_options_block, args)
          @theme_check.parse(args)
        end
      end

      def initialize(*)
        super
        @theme_check = ThemeCheck::Cli.new
        self.options = Options.new(@theme_check)
      end

      def call(*)
        @theme_check.run!
      rescue ThemeCheck::Cli::Abort, ThemeCheck::ThemeCheckError => e
        raise ShopifyCLI::Abort,
          ShopifyCLI::Context.message("theme.check.error", e.full_message)
      end

      def self.help
        ShopifyCLI::Context.message("theme.check.help", ShopifyCLI::TOOL_NAME)
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
shopify-cli-2.19.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.18.1 lib/project_types/theme/commands/check.rb
shopify-cli-2.18.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.17.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.16.1 lib/project_types/theme/commands/check.rb
shopify-cli-2.16.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.15.6 lib/project_types/theme/commands/check.rb
shopify-cli-2.15.5 lib/project_types/theme/commands/check.rb
shopify-cli-2.15.4 lib/project_types/theme/commands/check.rb
shopify-cli-2.15.3 lib/project_types/theme/commands/check.rb