devtools: clarify that lines up to 100 characters are ok

Since we allow line lengths of up to 100, and the CI checkpatches job
only check for that amount, the rest of our tooling and docs should
reflect this reality. Therefore we can:

* adjust the editorconfig to use that value, to save editors (e.g. vim)
  from automatically wrapping lines at 80 characters when typing.
  [Since python checkers all seem to expect 79 character lines max, add
  for python only a 79-char max line length.]

* change the default line length setting in checkpatches script to 100
  so as it matches CI and pre-merge checks.

* update the docs to clarify that while 80 chars is recommended, up to
  100 characters is acceptable.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
Bruce Richardson 2021-10-20 15:26:01 +01:00 committed by Thomas Monjalon
parent 872c6a2807
commit 8f86ffa631
3 changed files with 4 additions and 3 deletions

View File

@ -11,11 +11,12 @@ trim_trailing_whitespace = true
charset = utf-8 charset = utf-8
indent_style = tab indent_style = tab
tab_width = 8 tab_width = 8
max_line_length = 80 max_line_length = 100
[*.py] [*.py]
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
max_line_length = 79
[meson.build] [meson.build]
indent_style = space indent_style = space

View File

@ -15,7 +15,7 @@ VALIDATE_NEW_API=$(dirname $(readlink -f $0))/check-symbol-change.sh
# Codespell can also be enabled by setting DPDK_CHECKPATCH_CODESPELL to a valid path # Codespell can also be enabled by setting DPDK_CHECKPATCH_CODESPELL to a valid path
# to a dictionary.txt file if dictionary.txt is not in the default location. # to a dictionary.txt file if dictionary.txt is not in the default location.
codespell=${DPDK_CHECKPATCH_CODESPELL:-enable} codespell=${DPDK_CHECKPATCH_CODESPELL:-enable}
length=${DPDK_CHECKPATCH_LINE_LENGTH:-80} length=${DPDK_CHECKPATCH_LINE_LENGTH:-100}
# override default Linux options # override default Linux options
options="--no-tree" options="--no-tree"

View File

@ -27,7 +27,7 @@ Line length is recommended to be not more than 80 characters, including comments
.. note:: .. note::
The above is recommendation, and not a hard limit. The above is recommendation, and not a hard limit.
However, it is expected that the recommendations should be followed in all but the rarest situations. Generally, line lengths up to 100 characters are acceptable in the code.
C Comment Style C Comment Style
--------------- ---------------