Sha256: ef908fed1bf0c6c0fe98289b26ce1996733d94be7b0921cb989d7cd27b1c8cb0
Contents?: true
Size: 410 Bytes
Versions: 23
Compression:
Stored size: 410 Bytes
Contents
# frozen_string_literal: true module SlimLint # Searches for tab indentation class Linter::Tab < Linter include LinterRegistry MSG = 'Tab detected' on_start do |_sexp| dummy_node = Struct.new(:line) document.source_lines.each_with_index do |line, index| next unless line =~ /^( *)[\t ]*\t/ report_lint(dummy_node.new(index + 1), MSG) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems