Sha256: 569ebdeada38b4fc2c7d31808bf4ad01be292585281aa7f6a3621d1c5ccbda43

Contents?: true

Size: 321 Bytes

Versions: 1

Compression:

Stored size: 321 Bytes

Contents

module SlimLint
  # Searches for control statements with no code.
  class Linter::EmptyControlStatement < Linter
    include LinterRegistry

    on [:slim, :control] do |sexp|
      _, _, code = sexp
      next unless code =~ /\A\s*\Z/

      report_lint(sexp, 'Empty control statement can be removed')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slim_lint-0.2.0 lib/slim_lint/linter/empty_control_statement.rb