Commit Graph

3 Commits

Author SHA1 Message Date
Bruce Richardson
8f86ffa631 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>
2021-11-25 11:51:24 +01:00
Bruce Richardson
f2cdd95f2d doc: add Meson coding style to contributors guide
To help with consistency across all files, add a section to the
contributors guide on meson coding style. Although short, this covers
the basics for now, and can be extended in future as we see the need.

Meson style guide recommends four-space indents, like for python,
so add to editorconfig file.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-04-21 14:04:09 +02:00
Robin Jarry
5112e68001 devtools: add EditorConfig file
EditorConfig is a file format and collection of text editor plugins for
maintaining consistent coding styles between different editors and IDEs.

Initialize the file following the coding rules in
doc/guides/contributing/coding_style.rst,
doc/guides/contributing/documentation.rst and
doc/guides/contributing/patches.rst.

In order for this file to be taken into account (unless they use an
editor with built-in EditorConfig support), developers will have to
install a plugin.

Note: The max_line_length property is only supported by a limited number
of EditorConfig plugins. It will be ignored if unsupported.

Add this new file in MAINTAINERS in the "Developers and Maintainers
Tools" section.

Link: https://editorconfig.org/
Link: https://github.com/editorconfig/editorconfig-emacs
Link: https://github.com/editorconfig/editorconfig-vim
Link: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length

Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
2020-02-22 21:05:22 +01:00