Sha256: 2e8dbe733adfadedf9505a282ab560c816167595bffa08592796eabfed7a3707

Contents?: true

Size: 331 Bytes

Versions: 30

Compression:

Stored size: 331 Bytes

Contents

# frozen_string_literal: true
module ThemeCheck
  class ValidSchema < LiquidCheck
    severity :suggestion
    category :json
    doc docs_url(__FILE__)

    def on_schema(node)
      JSON.parse(node.value.nodelist.join)
    rescue JSON::ParserError => e
      add_offense(format_json_parse_error(e), node: node)
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
theme-check-1.8.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.7.2 lib/theme_check/checks/valid_schema.rb
theme-check-1.7.1 lib/theme_check/checks/valid_schema.rb
theme-check-1.7.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.6.2 lib/theme_check/checks/valid_schema.rb
theme-check-1.6.1 lib/theme_check/checks/valid_schema.rb
theme-check-1.6.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.5.2 lib/theme_check/checks/valid_schema.rb
theme-check-1.5.1 lib/theme_check/checks/valid_schema.rb
theme-check-1.5.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.4.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.3.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.2.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.1.0 lib/theme_check/checks/valid_schema.rb
theme-check-1.0.0 lib/theme_check/checks/valid_schema.rb
theme-check-0.10.2 lib/theme_check/checks/valid_schema.rb
theme-check-0.10.1 lib/theme_check/checks/valid_schema.rb
theme-check-0.10.0 lib/theme_check/checks/valid_schema.rb
theme-check-0.9.1 lib/theme_check/checks/valid_schema.rb
theme-check-0.9.0 lib/theme_check/checks/valid_schema.rb