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.36.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.35.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.34.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.33.1 lib/project_types/theme/commands/check.rb
shopify-cli-2.33.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.32.1 lib/project_types/theme/commands/check.rb
shopify-cli-2.32.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.31.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.30.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.29.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.28.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.27.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.26.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.25.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.24.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.23.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.22.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.21.0 lib/project_types/theme/commands/check.rb
shopify-cli-2.20.1 lib/project_types/theme/commands/check.rb
shopify-cli-2.20.0 lib/project_types/theme/commands/check.rb