You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2015/05/10 03:46:00 UTC

[jira] [Comment Edited] (HADOOP-11923) test-patch whitespace checker doesn't flag new files

    [ https://issues.apache.org/jira/browse/HADOOP-11923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14536985#comment-14536985 ] 

Allen Wittenauer edited comment on HADOOP-11923 at 5/10/15 1:45 AM:
--------------------------------------------------------------------

I haven't had a chance to double check the logic in CHANGED_FILES, but it should have both modified and new files in it.   There's a  chance that the find_changedfiles needs to have more logic in it to deal with different types of patchfiles.  But ultimately, it doesn't matter:

GITDIFFLINES isn't going to have new files in it either since the git diff won't register them. Thus
{code} ${GREP} -f "${GITDIFFLINES}"{code} swallows those lines and they disappear from the output.  So we need to add a git add -N as well as make sure that git diff is tied to the branch.

Additionally, it is probably easier to use git diff --check to actually do the whitespace check.


was (Author: aw):
I haven't had a chance to double check the logic in CHANGED_FILES, but it should have both modified and new files in it.   There's a  chance that the find_changedfiles needs to have more logic in it to deal with different types of patchfiles.  But ultimately, it doesn't matter:

GITDIFFLINES isn't going to have new files in it either since the git diff won't register them. Thus ${GREP} -f "${GITDIFFLINES}" swallows those lines and they disappear from the output.  So we need to add a git add -N as well as make sure that git diff is tied to the branch.

Additionally, it is probably easier to use git diff --check to actually do the whitespace check.

> test-patch whitespace checker doesn't flag new files
> ----------------------------------------------------
>
>                 Key: HADOOP-11923
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11923
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Sean Busbey
>            Priority: Critical
>              Labels: BB2015-05-TBR
>         Attachments: HADOOP-11923.patch
>
>
> The whitespace plugin for test-patch only examines new files. So when a patch comes in with trailing whitespace on new files it doesn't flag things as a problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)