]> Pileus Git - ~andy/linux/blobdiff - scripts/checkpatch.pl
checkpatch: improve space before tab --fix option
[~andy/linux] / scripts / checkpatch.pl
index 93f8507b7ac253dc93013d22f67caa87738d727a..3e0b3f4d34203143d69b9c3c2ccf24dea9ac7278 100755 (executable)
@@ -2118,8 +2118,10 @@ sub process {
                        if (WARN("SPACE_BEFORE_TAB",
                                "please, no space before tabs\n" . $herevet) &&
                            $fix) {
-                               $fixed[$linenr - 1] =~
-                                   s/(^\+.*) +\t/$1\t/;
+                               while ($fixed[$linenr - 1] =~
+                                          s/(^\+.*) {8,8}+\t/$1\t\t/) {}
+                               while ($fixed[$linenr - 1] =~
+                                          s/(^\+.*) +\t/$1\t/) {}
                        }
                }