lkml.org 
[lkml]   [2015]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scripts: checkpatch: remove preceding dot-slash from path name
Date
In case checkpatch is called with a path name that starts with ./ for
the current directory not all issues are being reported since internal
path checks don't succeed. This patch removes the leading './' from
$filename. This is needed to have checkpatch report all issues found
during execution.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
scripts/checkpatch.pl | 3 +++
1 file changed, 3 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f2a1131..44435fd 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -730,6 +730,9 @@ my $fixlinenr = -1;
my $vname;
for my $filename (@ARGV) {
my $FILE;
+ if ($filename =~ /^(\.\/)/) {
+ substr($filename, 0, 2) = "";
+ }
if ($file) {
open($FILE, '-|', "diff -u /dev/null $filename") ||
die "$P: $filename: diff failed - $!\n";
--
1.7.9.5


\
 
 \ /
  Last update: 2015-10-29 14:41    [W:0.167 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site