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

Kengo Seki commented on HADOOP-11807:
-------------------------------------

Hi [~ramtinb], your patch seems to work fine. I have some comments:

* checkMissingComponent()
** It can be simplified like below. checkMissingAssignee() is also the same.
{code}
def checkMissingComponent(self):
  return len(self.fields['components']) < 1 
{code}

* checkMissingAssignee()
** [PEP 
8|https://www.python.org/dev/peps/pep-0008/#programming-recommendations] says 
"Comparisons to singletons like None should always be done with is or is not, 
never the equality operators". 
   "... is not None" is more desirable than "... != None" (the original source 
has the same problem).

* checkVersionString()
** re.match() applies the pattern at the start of the string, so '^' at the 
head of the pattern can be removed. 
   The outermost and first inner parentheses, and '.*$' may be also unnecessary.

* main()
** Some typos (variable erorrCount, string "componenet")
** It may be better that errorCount and warningCount are formatted as integers, 
not as strings
** I think os._exit() is not so popular and sys.exit() is preferred in general.

> add a lint mode to releasedocmaker
> ----------------------------------
>
>                 Key: HADOOP-11807
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11807
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: build, documentation
>    Affects Versions: 3.0.0
>            Reporter: Allen Wittenauer
>            Assignee: ramtin
>            Priority: Minor
>         Attachments: HADOOP-11807.001.patch
>
>
> * check for missing components (error)
> * check for missing assignee (error)
> * check for common version problems (warning)
> * add an error message for missing release notes



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

Reply via email to