@@ -1374,13 +1374,20 @@ sub process {
# check we are in a valid source file if not then ignore this hunk
next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);
-#80 column limit
+#Line too long
if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
$rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
- $line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ &&
- $length > 80)
- {
- WARN("line over 80 characters\n" . $herecurr);
+ $line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/) {
+ if ($length > 105) {
+ WARN("line over 105 characters\n" . $herecurr);
+ } elsif ($length > 80) {
+ CHK("line over 80 characters\n" . $herecurr);
+ }
+ }
+
+#too many leading tabs - deep leading indent
+ if ($line =~ /^\+ {6,}(?!(.*,$|.*\);$))/) {
+ CHK("Too many leading tabs. Consider restructuring code\n" . $herecurr);
}
# check for adding lines without a newline.