-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Summary
I was looking for a rule which checks for a blank line at the start of a file – the first character of the file is a newline.
I can't find one... (I assume I just haven't failed to notice it.) it seems like it would be an easy thing to provide?
In a certain sense, the mirror image of too-many-newlines-at-end-of-file – except it would be triggered by any non-zero number of initial newlines, not by just one. (I guess you could also have it match whitespace followed by a newline.)
I realise the formatter will get rid of this, but I work on a code base where we are slowly introducing new ruff check rules, and we aren't yet at the point we want to enforce running ruff format on every file. But I just deleted every initial newline out of the code base, and I'd like a ruff check to ensure we don't get any coming back, but there doesn't seem to be one.