Sha256: cfb9800b8d44d55371a968ee62f7418c7443d0adb3fb40a02800c9872ab961e1
Contents?: true
Size: 467 Bytes
Versions: 20
Compression:
Stored size: 467 Bytes
Contents
module SlimLint # Searches for control statements with only comments. class Linter::CommentControlStatement < Linter include LinterRegistry on [:slim, :control] do |sexp| _, _, code = sexp next unless code[/\A\s*#/] comment = code[/\A\s*#(.*\z)/, 1] report_lint(sexp, "Slim code comments (`/#{comment}`) are preferred over " \ "control statement comments (`-##{comment}`)") end end end
Version data entries
20 entries across 20 versions & 1 rubygems