Re: [edk2] [Patch 1/3] BaseTools: Update PatchCheck for max length of subject and message line

2016-10-17 Thread Zhu, Yonghong
I will remove the blank line after 'Fixes:' when I push this patch. thanks for 
the comment.

Best Regards,
Zhu Yonghong

-Original Message-
From: Justen, Jordan L 
Sent: Tuesday, October 18, 2016 12:40 AM
To: Zhu, Yonghong ; edk2-devel@lists.01.org
Cc: Gao, Liming 
Subject: Re: [edk2] [Patch 1/3] BaseTools: Update PatchCheck for max length of 
subject and message line

On 2016-10-17 01:28:36, Yonghong Zhu wrote:
> This patch update PatchCheck.py:
> 1. The subject line of the commit message should be < 72 characters.
> 2. The other lines of the commit message should be < 76 characters.
> 
> Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=113
> 

Can you remove the blank line after 'Fixes:'? The end of the commit message has 
various tags, like Fixes, Cc, Contributed-under, Signed-off-by, Reviewed-by, 
etc. They can be one tag per line and grouped together.

Patch 1 Reviewed-by: Jordan Justen 

> Cc: Liming Gao 
> Cc: Jordan Justen 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu 
> ---
>  BaseTools/Scripts/PatchCheck.py | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py 
> b/BaseTools/Scripts/PatchCheck.py index 455c130..07fca68 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -1,9 +1,9 @@
>  ## @file
>  #  Check a patch for various format issues  # -#  Copyright (c) 2015, 
> Intel Corporation. All rights reserved.
> +#  Copyright (c) 2015 - 2016, Intel Corporation. All rights 
> +reserved.
>  #
>  #  This program and the accompanying materials are licensed and made  
> #  available under the terms and conditions of the BSD License which  
> #  accompanies this distribution. The full text of the license may be  
> #  found at http://opensource.org/licenses/bsd-license.php
> @@ -14,11 +14,11 @@
>  #
>  
>  from __future__ import print_function
>  
>  VersionNumber = '0.1'
> -__copyright__ = "Copyright (c) 2015, Intel Corporation  All rights reserved."
> +__copyright__ = "Copyright (c) 2015 - 2016, Intel Corporation  All rights 
> reserved."
>  
>  import email
>  import argparse
>  import os
>  import re
> @@ -195,11 +195,11 @@ class CommitMessageCheck:
>  
>  if count <= 0:
>  self.error('Empty commit message!')
>  return
>  
> -if count >= 1 and len(lines[0]) > 76:
> +if count >= 1 and len(lines[0]) >= 72:
>  self.error('First line of commit message (subject line) ' +
> 'is too long.')
>  
>  if count >= 1 and len(lines[0].strip()) == 0:
>  self.error('First line of commit message (subject line) ' 
> + @@ -208,11 +208,11 @@ class CommitMessageCheck:
>  if count >= 2 and lines[1].strip() != '':
>  self.error('Second line of commit message should be ' +
> 'empty.')
>  
>  for i in range(2, count):
> -if (len(lines[i]) > 76 and
> +if (len(lines[i]) >= 76 and
>  len(lines[i].split()) > 1 and
>  not lines[i].startswith('git-svn-id:')):
>  self.error('Line %d of commit message is too long.' % 
> (i + 1))
>  
>  last_sig_line = None
> --
> 2.6.1.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 1/3] BaseTools: Update PatchCheck for max length of subject and message line

2016-10-17 Thread Jordan Justen
On 2016-10-17 01:28:36, Yonghong Zhu wrote:
> This patch update PatchCheck.py:
> 1. The subject line of the commit message should be < 72 characters.
> 2. The other lines of the commit message should be < 76 characters.
> 
> Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=113
> 

Can you remove the blank line after 'Fixes:'? The end of the commit
message has various tags, like Fixes, Cc, Contributed-under,
Signed-off-by, Reviewed-by, etc. They can be one tag per line and
grouped together.

Patch 1 Reviewed-by: Jordan Justen 

> Cc: Liming Gao 
> Cc: Jordan Justen 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu 
> ---
>  BaseTools/Scripts/PatchCheck.py | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index 455c130..07fca68 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -1,9 +1,9 @@
>  ## @file
>  #  Check a patch for various format issues
>  #
> -#  Copyright (c) 2015, Intel Corporation. All rights reserved.
> +#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
>  #
>  #  This program and the accompanying materials are licensed and made
>  #  available under the terms and conditions of the BSD License which
>  #  accompanies this distribution. The full text of the license may be
>  #  found at http://opensource.org/licenses/bsd-license.php
> @@ -14,11 +14,11 @@
>  #
>  
>  from __future__ import print_function
>  
>  VersionNumber = '0.1'
> -__copyright__ = "Copyright (c) 2015, Intel Corporation  All rights reserved."
> +__copyright__ = "Copyright (c) 2015 - 2016, Intel Corporation  All rights 
> reserved."
>  
>  import email
>  import argparse
>  import os
>  import re
> @@ -195,11 +195,11 @@ class CommitMessageCheck:
>  
>  if count <= 0:
>  self.error('Empty commit message!')
>  return
>  
> -if count >= 1 and len(lines[0]) > 76:
> +if count >= 1 and len(lines[0]) >= 72:
>  self.error('First line of commit message (subject line) ' +
> 'is too long.')
>  
>  if count >= 1 and len(lines[0].strip()) == 0:
>  self.error('First line of commit message (subject line) ' +
> @@ -208,11 +208,11 @@ class CommitMessageCheck:
>  if count >= 2 and lines[1].strip() != '':
>  self.error('Second line of commit message should be ' +
> 'empty.')
>  
>  for i in range(2, count):
> -if (len(lines[i]) > 76 and
> +if (len(lines[i]) >= 76 and
>  len(lines[i].split()) > 1 and
>  not lines[i].startswith('git-svn-id:')):
>  self.error('Line %d of commit message is too long.' % (i + 
> 1))
>  
>  last_sig_line = None
> -- 
> 2.6.1.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch 1/3] BaseTools: Update PatchCheck for max length of subject and message line

2016-10-17 Thread Yonghong Zhu
This patch update PatchCheck.py:
1. The subject line of the commit message should be < 72 characters.
2. The other lines of the commit message should be < 76 characters.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=113

Cc: Liming Gao 
Cc: Jordan Justen 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu 
---
 BaseTools/Scripts/PatchCheck.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 455c130..07fca68 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -1,9 +1,9 @@
 ## @file
 #  Check a patch for various format issues
 #
-#  Copyright (c) 2015, Intel Corporation. All rights reserved.
+#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
 #
 #  This program and the accompanying materials are licensed and made
 #  available under the terms and conditions of the BSD License which
 #  accompanies this distribution. The full text of the license may be
 #  found at http://opensource.org/licenses/bsd-license.php
@@ -14,11 +14,11 @@
 #
 
 from __future__ import print_function
 
 VersionNumber = '0.1'
-__copyright__ = "Copyright (c) 2015, Intel Corporation  All rights reserved."
+__copyright__ = "Copyright (c) 2015 - 2016, Intel Corporation  All rights 
reserved."
 
 import email
 import argparse
 import os
 import re
@@ -195,11 +195,11 @@ class CommitMessageCheck:
 
 if count <= 0:
 self.error('Empty commit message!')
 return
 
-if count >= 1 and len(lines[0]) > 76:
+if count >= 1 and len(lines[0]) >= 72:
 self.error('First line of commit message (subject line) ' +
'is too long.')
 
 if count >= 1 and len(lines[0].strip()) == 0:
 self.error('First line of commit message (subject line) ' +
@@ -208,11 +208,11 @@ class CommitMessageCheck:
 if count >= 2 and lines[1].strip() != '':
 self.error('Second line of commit message should be ' +
'empty.')
 
 for i in range(2, count):
-if (len(lines[i]) > 76 and
+if (len(lines[i]) >= 76 and
 len(lines[i].split()) > 1 and
 not lines[i].startswith('git-svn-id:')):
 self.error('Line %d of commit message is too long.' % (i + 1))
 
 last_sig_line = None
-- 
2.6.1.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel