It currently checks if there is no newline, but won't complain if there are several newlines at EOF. There should only be one, at least for CPP files. There may be some other constraints for other formats like Cmake that I don't know about.
Created attachment 218710 [details] patch
This will log both errors when there is no new line at the and but there is a blank line before it. This is confusing.
(In reply to comment #2) > This will log both errors when there is no new line at the and but there is a blank line before it. This is confusing. I'm not sure what test case you are describing. Can you give a concrete example? (It's entirely possible that this extra-newlines-at-EOL check should just be merged with the missing-EOF-newline check)
(In reply to comment #3) > (In reply to comment #2) > > This will log both errors when there is no new line at the and but there is a blank line before it. This is confusing. > > I'm not sure what test case you are describing. Can you give a concrete example? example: //firstline \n //secondline \n \n //last line This will log both errors, because there is no new line at the end, but there is a blank line before it. > (It's entirely possible that this extra-newlines-at-EOL check should just be merged with the missing-EOF-newline check) I think the merge is a good idea.
Comment on attachment 218710 [details] patch Clearing flags on attachment: 218710 Committed r160319: <http://trac.webkit.org/changeset/160319>
All reviewed patches have been landed. Closing bug.