|
51 | 51 | my @ignore = (); |
52 | 52 | my $help = 0; |
53 | 53 | my $configuration_file = ".checkpatch.conf"; |
54 | | -my $max_line_length = 80; |
| 54 | +my $max_line_length = 100; |
55 | 55 | my $ignore_perl_version = 0; |
56 | 56 | my $minimum_perl_version = 5.10.0; |
57 | 57 | my $min_conf_desc_length = 4; |
@@ -97,9 +97,11 @@ sub help { |
97 | 97 | --types TYPE(,TYPE2...) show only these comma separated message types |
98 | 98 | --ignore TYPE(,TYPE2...) ignore various comma separated message types |
99 | 99 | --show-types show the specific message type in the output |
100 | | - --max-line-length=n set the maximum line length, if exceeded, warn |
| 100 | + --max-line-length=n set the maximum line length, (default $max_line_length) |
| 101 | + if exceeded, warn on patches |
| 102 | + requires --strict for use with --file |
101 | 103 | --min-conf-desc-length=n set the min description length, if shorter, warn |
102 | | - --tab-size=n set the number of spaces for tab (default 8) |
| 104 | + --tab-size=n set the number of spaces for tab (default $tabsize) |
103 | 105 | --root=PATH PATH to the kernel tree root |
104 | 106 | --no-summary suppress the per-file summary |
105 | 107 | --mailback only produce a report in case of warnings/errors |
@@ -3240,8 +3242,10 @@ sub process { |
3240 | 3242 |
|
3241 | 3243 | if ($msg_type ne "" && |
3242 | 3244 | (show_type("LONG_LINE") || show_type($msg_type))) { |
3243 | | - WARN($msg_type, |
3244 | | - "line over $max_line_length characters\n" . $herecurr); |
| 3245 | + my $msg_level = \&WARN; |
| 3246 | + $msg_level = \&CHK if ($file); |
| 3247 | + &{$msg_level}($msg_type, |
| 3248 | + "line length of $length exceeds $max_line_length columns\n" . $herecurr); |
3245 | 3249 | } |
3246 | 3250 | } |
3247 | 3251 |
|
|
0 commit comments