Sha256: c9a9c862f28ed5fa17dceed0ac08201014b057ee634796ad8c50302a01e1b216

Contents?: true

Size: 446 Bytes

Versions: 5

Compression:

Stored size: 446 Bytes

Contents

# frozen_string_literal: true

module SlimLint
  # Checks for forbidden embedded engines.
  class Linter::EmbeddedEngines < Linter
    include LinterRegistry

    MESSAGE = "Forbidden embedded engine `%s` found"

    on [:slim, :embedded] do |sexp|
      _, _, engine, _ = sexp

      forbidden_engines = config["forbidden_engines"]
      next unless forbidden_engines.include?(engine)
      report_lint(sexp, MESSAGE % engine)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slim_lint_standard-0.0.2.2 lib/slim_lint/linter/embedded_engines.rb
slim_lint_standard-0.0.2.1 lib/slim_lint/linter/embedded_engines.rb
slim_lint_standard-0.0.2 lib/slim_lint/linter/embedded_engines.rb
slim_lint_standard-0.0.1 lib/slim_lint/linter/embedded_engines.rb
slim_lint_standard-0.0.0 lib/slim_lint/linter/embedded_engines.rb