I'm using CodeClimate's grep engine and I would like a pattern to verify that our code files end with a blank line. I've seen a lot of posts explaining how to count and find blank lines, but I want to specific check EOF.
Asked
Active
Viewed 74 times
0
-
1Not familiar with this engine but in case you check your files with a command like `grep-engine-command myfile` you could use something like `grep-engine-command <(tail -n1 myfile)` – George Vasiliou Sep 12 '17 at 21:12
-
1Grep operates a line at a time. AFAIK, it doesn't have any visibility to the line break characters themselves. – Barmar Sep 12 '17 at 21:17