Sha256: 05e08ee817f3e4779d11b0dd37d11b509808f03fa45a78f0158f543a81663b92

Contents?: true

Size: 304 Bytes

Versions: 10

Compression:

Stored size: 304 Bytes

Contents

# frozen_string_literal: true
module ThemeCheck
  class ValidSchema < LiquidCheck
    severity :suggestion
    category :json

    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

10 entries across 10 versions & 1 rubygems

Version Path
theme-check-0.4.0 lib/theme_check/checks/valid_schema.rb
theme-check-0.3.3 lib/theme_check/checks/valid_schema.rb
theme-check-0.3.2 lib/theme_check/checks/valid_schema.rb
theme-check-0.3.1 lib/theme_check/checks/valid_schema.rb
theme-check-0.3.0 lib/theme_check/checks/valid_schema.rb
theme-check-0.2.2 lib/theme_check/checks/valid_schema.rb
theme-check-0.2.0 lib/theme_check/checks/valid_schema.rb
theme-check-0.1.2 lib/theme_check/checks/valid_schema.rb
theme-check-0.1.1 lib/theme_check/checks/valid_schema.rb
theme-check-0.1.0 lib/theme_check/checks/valid_schema.rb