Created
March 12, 2014 21:04
-
-
Save maxlinc/9516309 to your computer and use it in GitHub Desktop.
Check for trailing blank lines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dir['**/*.rb'].each do |f| | |
| begin | |
| puts f unless File.read(f) =~ /^$\Z/ | |
| rescue => e | |
| $stderr.puts "Couldn't read #{f}: #{e.message}" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment