diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3037e8c2258c..969b365f8690 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -43,6 +43,7 @@ my $configuration_file = ".checkpatch.conf"; | |||
| 43 | my $max_line_length = 80; | 43 | my $max_line_length = 80; |
| 44 | my $ignore_perl_version = 0; | 44 | my $ignore_perl_version = 0; |
| 45 | my $minimum_perl_version = 5.10.0; | 45 | my $minimum_perl_version = 5.10.0; |
| 46 | my $min_conf_desc_length = 4; | ||
| 46 | 47 | ||
| 47 | sub help { | 48 | sub help { |
| 48 | my ($exitcode) = @_; | 49 | my ($exitcode) = @_; |
| @@ -63,6 +64,7 @@ Options: | |||
| 63 | --types TYPE(,TYPE2...) show only these comma separated message types | 64 | --types TYPE(,TYPE2...) show only these comma separated message types |
| 64 | --ignore TYPE(,TYPE2...) ignore various comma separated message types | 65 | --ignore TYPE(,TYPE2...) ignore various comma separated message types |
| 65 | --max-line-length=n set the maximum line length, if exceeded, warn | 66 | --max-line-length=n set the maximum line length, if exceeded, warn |
| 67 | --min-conf-desc-length=n set the min description length, if shorter, warn | ||
| 66 | --show-types show the message "types" in the output | 68 | --show-types show the message "types" in the output |
| 67 | --root=PATH PATH to the kernel tree root | 69 | --root=PATH PATH to the kernel tree root |
| 68 | --no-summary suppress the per-file summary | 70 | --no-summary suppress the per-file summary |
| @@ -131,6 +133,7 @@ GetOptions( | |||
| 131 | 'types=s' => \@use, | 133 | 'types=s' => \@use, |
| 132 | 'show-types!' => \$show_types, | 134 | 'show-types!' => \$show_types, |
| 133 | 'max-line-length=i' => \$max_line_length, | 135 | 'max-line-length=i' => \$max_line_length, |
| 136 | 'min-conf-desc-length=i' => \$min_conf_desc_length, | ||
| 134 | 'root=s' => \$root, | 137 | 'root=s' => \$root, |
| 135 | 'summary!' => \$summary, | 138 | 'summary!' => \$summary, |
| 136 | 'mailback!' => \$mailback, | 139 | 'mailback!' => \$mailback, |
| @@ -2285,8 +2288,10 @@ sub process { | |||
| 2285 | } | 2288 | } |
| 2286 | $length++; | 2289 | $length++; |
| 2287 | } | 2290 | } |
| 2288 | WARN("CONFIG_DESCRIPTION", | 2291 | if ($is_start && $is_end && $length < $min_conf_desc_length) { |
| 2289 | "please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_start && $is_end && $length < 4); | 2292 | WARN("CONFIG_DESCRIPTION", |
| 2293 | "please write a paragraph that describes the config symbol fully\n" . $herecurr); | ||
| 2294 | } | ||
| 2290 | #print "is_start<$is_start> is_end<$is_end> length<$length>\n"; | 2295 | #print "is_start<$is_start> is_end<$is_end> length<$length>\n"; |
| 2291 | } | 2296 | } |
| 2292 | 2297 | ||
