History

checkpatch: describe --min-conf-desc-length

Neither the warning nor the help message gives any hint on the unit for length: Could be meters, inches, bytes, characters or ... lines. Extend the output of `--help` to name the unit "lines" and the default: - --min-conf-desc-length=n set the min description length, if shorter, warn + --min-conf-desc-length=n set the minimum description length for config symbols + in lines, if shorter, warn (default 4) Include the minimum number of lines as other error messages already do: - WARNING: please write a help paragraph that fully describes the config symbol + WARNING: please write a help paragraph that fully describes the config symbol with at least 4 lines

Philipp Hahn committed 1 year ago

Commit bc2f19d1 parent 28939c31 file · +3 −2Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+3−2
@@ -113,7 +113,8 @@ Options: · 112 unmodified lines
113 --max-line-length=n set the maximum line length, (default $max_line_length)113 --max-line-length=n set the maximum line length, (default $max_line_length)
114 if exceeded, warn on patches114 if exceeded, warn on patches
115 requires --strict for use with --file115 requires --strict for use with --file
116 --min-conf-desc-length=n set the min description length, if shorter, warn116 --min-conf-desc-length=n set the minimum description length for config symbols
117 in lines, if shorter, warn (default $min_conf_desc_length)
117 --tab-size=n set the number of spaces for tab (default $tabsize)118 --tab-size=n set the number of spaces for tab (default $tabsize)
118 --root=PATH PATH to the kernel tree root119 --root=PATH PATH to the kernel tree root
119 --no-summary suppress the per-file summary120 --no-summary suppress the per-file summary
@@ -3645,7 +3646,7 @@ sub process { · 3525 unmodified lines
3645 $help_length < $min_conf_desc_length) {3646 $help_length < $min_conf_desc_length) {
3646 my $stat_real = get_stat_real($linenr, $ln - 1);3647 my $stat_real = get_stat_real($linenr, $ln - 1);
3647 WARN("CONFIG_DESCRIPTION",3648 WARN("CONFIG_DESCRIPTION",
3648 "please write a help paragraph that fully describes the config symbol\n" . "$here\n$stat_real\n");3649 "please write a help paragraph that fully describes the config symbol with at least $min_conf_desc_length lines\n" . "$here\n$stat_real\n");
3649 }3650 }
3650 }3651 }
3651 3652