RESOLVED FIXED 125424
check-webkit-style should check for extra newlines at EOF
https://bugs.webkit.org/show_bug.cgi?id=125424
Summary check-webkit-style should check for extra newlines at EOF
Brian Burg
Reported 2013-12-08 11:43:39 PST
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.
Attachments
patch (4.65 KB, patch)
2013-12-08 13:28 PST, Brian Burg
no flags
Brian Burg
Comment 1 2013-12-08 13:28:00 PST
László Langó
Comment 2 2013-12-09 00:14:59 PST
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.
Brian Burg
Comment 3 2013-12-09 00:19:57 PST
(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)
László Langó
Comment 4 2013-12-09 00:26:17 PST
(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.
WebKit Commit Bot
Comment 5 2013-12-09 10:58:12 PST
Comment on attachment 218710 [details] patch Clearing flags on attachment: 218710 Committed r160319: <http://trac.webkit.org/changeset/160319>
WebKit Commit Bot
Comment 6 2013-12-09 10:58:14 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.