trigger: generate and add tracer token on registration
[lttng-tools.git] / extras / checkpatch.pl
index 4d2c7dfdaabd44abd21e53072eee8f8f884890e8..286c94de33462d0d79d1b2712a431d6bf9e1ee88 100755 (executable)
@@ -3,7 +3,8 @@
 # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
 # (c) 2008-2010 Andy Whitcroft <apw@canonical.com>
-# Licensed under the terms of the GNU GPL License version 2
+#
+# SPDX-License-Identifier: GPL-2.0-only
 
 use strict;
 
@@ -500,7 +501,7 @@ sub expand_tabs {
                if ($c eq "\t") {
                        $res .= ' ';
                        $n++;
-                       for (; ($n % 8) != 0; $n++) {
+                       for (; ($n % 4) != 0; $n++) {
                                $res .= ' ';
                        }
                        next;
@@ -1860,8 +1861,8 @@ sub process {
                                my $newindent = $2;
 
                                my $goodtabindent = $oldindent .
-                                       "\t" x ($pos / 8) .
-                                       " "  x ($pos % 8);
+                                       "\t" x ($pos / 4) .
+                                       " "  x ($pos % 4);
                                my $goodspaceindent = $oldindent . " "  x $pos;
 
                                if ($newindent ne $goodtabindent &&
@@ -2164,7 +2165,7 @@ sub process {
 
                        #print "line<$line> prevline<$prevline> indent<$indent> sindent<$sindent> check<$check> continuation<$continuation> s<$s> cond_lines<$cond_lines> stat_real<$stat_real> stat<$stat>\n";
 
-                       if ($check && (($sindent % 8) != 0 ||
+                       if ($check && (($sindent % 4) != 0 ||
                            ($sindent <= $indent && $s ne ''))) {
                                WARN("SUSPECT_CODE_INDENT",
                                     "suspect code indent for conditional statements ($indent, $sindent)\n" . $herecurr . "$stat_real\n");
@@ -3198,7 +3199,7 @@ sub process {
                                        $herectx .= raw_line($linenr, $n) . "\n";
                                }
 
-                               WARN("BRACES",
+                               WARN("BRACES_SINGLE_STMT",
                                     "braces {} are not necessary for single statement blocks\n" . $herectx);
                        }
                }
This page took 0.024333 seconds and 4 git commands to generate.