lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue,  8 Jul 2014 10:53:34 -0700
From:	Joe Perches <joe@...ches.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Andy Whitcroft <apw@...onical.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Josh Triplett <josh@...htriplett.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] checkpatch: Add ability to insert/delete lines

Creating patches for files or modifying existing patches can be a bit
easier when lines need to be added or deleted.

Here's a start at that.

There are still false positives for things like

For example, this can be useful for staging where blank lines after
declarations are desired.

For instance: (using --strict also enables multiple blank line removals)

for a single file:

$ ./scripts/checkpatch.pl -f --fix-inplace --strict --types=line_spacing \
  drivers/staging/android/binder.c
$ git diff --shortstat drivers/staging/android/binder.c
 1 file changed, 4 insertions(+), 4 deletions(-)

for all files in drivers/staging:

$ git ls-files "drivers/staging/*.[ch]" | \
  xargs ./scripts/checkpatch.pl -f --fix-inplace --strict --types=line_spacing
$ git diff --shortstat drivers/staging/
 1028 files changed, 2513 insertions(+), 3540 deletions(-)

There are still some false positives like:

drivers/staging/ced1401/use14_ioc.h where an old Microsoftism for FAR is used.
The test adds an unnecessary blank line there.

So, as ever, this is just a convenience function.
Don't rely on it.
  
Joe Perches (2):
  checkpatch: Add an index variable for fixed lines
  checkpatch: Add ability to insert and delete lines to patch/file

 scripts/checkpatch.pl | 255 +++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 190 insertions(+), 65 deletions(-)

-- 
1.8.1.2.459.gbcd45b4.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ