class RuboCop::Cop::Layout::LeadingEmptyLines
# a comment
# (start of file)
# good
end
class Foo
# (start of file)
# good
# a comment
# (start of file)
# bad
end
class Foo
# (start of file)
# bad
@example
of a file.
Checks for unnecessary leading blank lines at the beginning
def on_new_investigation
def on_new_investigation token = processed_source.tokens[0] return unless token && token.line > 1 add_offense(token.pos) do |corrector| range = Parser::Source::Range.new(processed_source.buffer, 0, token.begin_pos) corrector.remove(range) end end