Sha256: fa76d07393d4f1f3f537b2a7bc41620d01dd75ee7abc12cab1a1cb283d8615b3
Contents?: true
Size: 566 Bytes
Versions: 10
Compression:
Stored size: 566 Bytes
Contents
# frozen_string_literal: true module ThemeCheck # # Unwanted: # # {{ x | some_unknown_filter }} # # Wanted: # # {{ x | upcase }} # class UnknownFilter < LiquidCheck severity :error category :liquid doc docs_url(__FILE__) def on_variable(node) used_filters = node.filters.map { |name, *_rest| name } undefined_filters = used_filters - ShopifyLiquid::Filter.labels undefined_filters.each do |undefined_filter| add_offense("Undefined filter `#{undefined_filter}`", node: node) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems