[2/2] checkpatch: minor whitespace changes for readability

Message ID 20240203195527.212505-3-jim.cromie@gmail.com
State New
Headers
Series [1/2] checkpatch: tolerate long lines w/o spaces |

Commit Message

Jim Cromie Feb. 3, 2024, 7:55 p.m. UTC
  Change the per-patch report format slightly, so its more paragraphic,
and easier to peruse/scan.

OLD FORM:

0001-checkpatch-report last line, looks part of 0002 has no ...
--------------------------------------------------------------
0002-checkpatch-minor-whitespace-changes-for-readability.patch
--------------------------------------------------------------
total: 0 errors, 0 warnings, 15 lines checked

0002-checkpatch-minor-whitespace-changes-for-readability.patch has no ...
--------------------------------------------------------------

NEW FORM:

--------------------------------------------------------------
0002-checkpatch-minor-whitespace-changes-for-readability.patch
--------------------------------------------------------------
total: 0 errors, 0 warnings, 15 lines checked
0002-checkpatch-minor-whitespace-changes-for-readability.patch
 has no obvious style problems and is ready for submission.

--------------------------------------------------------------

For the optimum (warning free) patchset, the new report format is a
series of single paragraphs (with the --- banners), one for each patch
in the series.  This is trivial to scan/peruse, and is also more
visually distinct from warning/error reports.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 scripts/checkpatch.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Joe Perches Feb. 5, 2024, 5:38 p.m. UTC | #1
On Sat, 2024-02-03 at 12:55 -0700, Jim Cromie wrote:
> Change the per-patch report format slightly, so its more paragraphic,
> and easier to peruse/scan.
> 
> OLD FORM:
> 
> 0001-checkpatch-report last line, looks part of 0002 has no ...
> --------------------------------------------------------------
> 0002-checkpatch-minor-whitespace-changes-for-readability.patch
> --------------------------------------------------------------
> total: 0 errors, 0 warnings, 15 lines checked
> 
> 0002-checkpatch-minor-whitespace-changes-for-readability.patch has no ...
> --------------------------------------------------------------
> 
> NEW FORM:
> 
> --------------------------------------------------------------
> 0002-checkpatch-minor-whitespace-changes-for-readability.patch
> --------------------------------------------------------------
> total: 0 errors, 0 warnings, 15 lines checked
> 0002-checkpatch-minor-whitespace-changes-for-readability.patch
>  has no obvious style problems and is ready for submission.
> 
> --------------------------------------------------------------
> 
> For the optimum (warning free) patchset, the new report format is a
> series of single paragraphs (with the --- banners), one for each patch
> in the series.  This is trivial to scan/peruse, and is also more
> visually distinct from warning/error reports.
> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
>  scripts/checkpatch.pl | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index dc17c6da3af2..cd249ae9abdd 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -7796,12 +7796,12 @@ EOM
>  	}
>  
>  	if ($quiet == 0) {
> -		print "\n";
>  		if ($clean == 1) {
> -			print "$vname has no obvious style problems and is ready for submission.\n";
> +			print "$vname \n has no obvious style problems and is ready for submission.\n";

Space after filename / $vname isn't necessary.

>  		} else {
> -			print "$vname has style problems, please review.\n";
> +			print "$vname \n has style problems, please review.\n";

here too.

>  		}
> +		print "\n";
>  	}
>  	return $clean;
>  }
  

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index dc17c6da3af2..cd249ae9abdd 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -7796,12 +7796,12 @@  EOM
 	}
 
 	if ($quiet == 0) {
-		print "\n";
 		if ($clean == 1) {
-			print "$vname has no obvious style problems and is ready for submission.\n";
+			print "$vname \n has no obvious style problems and is ready for submission.\n";
 		} else {
-			print "$vname has style problems, please review.\n";
+			print "$vname \n has style problems, please review.\n";
 		}
+		print "\n";
 	}
 	return $clean;
 }