Sha256: ac9c0b1fafcb619c579de1cad9af119af483f88feb398f5ea5584696603a03d3
Contents?: true
Size: 543 Bytes
Versions: 19
Compression:
Stored size: 543 Bytes
Contents
# frozen_string_literal: true module PlatformosCheck # Recommends replacing `include` for `render` class ConvertIncludeToRender < LiquidCheck severity :suggestion category :liquid doc docs_url(__FILE__) def on_include(node) add_offense("`include` is deprecated - convert it to `render`", node:) do |corrector| # We need to fix #445 and pass the variables from the context or don't replace at all. # corrector.replace(node, "render \'#{node.value.template_name_expr}\' ") end end end end
Version data entries
19 entries across 19 versions & 1 rubygems