Add EditorConfig reference to README.developer

Change-Id: I595e94bd0274e3ee3c1d8764fc6c93f28993c30f
Reviewed-on: https://code.wireshark.org/review/14468
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
João Valverde 2016-03-14 14:40:06 +00:00 committed by Pascal Quantin
parent d4b3c8602c
commit 11cd41d922
1 changed files with 23 additions and 6 deletions

View File

@ -667,12 +667,29 @@ discussion of tabs, spaces, and indentation, see
http://www.jwz.org/doc/tabs-vs-spaces.html
When creating a new file, you are free to choose an indentation logic.
Most of the files in Wireshark tend to use 2-space or 4-space
indentation. You are encouraged to write a short comment on the
indentation logic at the beginning of this new files. The
tabs-vs-spaces document above provides examples of Emacs and vi
modelines for this purpose.
Most of the files in Wireshark tend to use 2-space or 4-space indentation. When
creating a new file you are free to choose an indentation logic but you are
encouraged to use 4-space indentation for C/C++ source to keep inconsistency
between files to a minimum.
Each file should have a short comment (modelines) on the indentation logic at
the end of the file. See
https://www.wireshark.org/tools/modelines.html
for guidance.
A complementary and arguably better alternative to modelines is
EditorConfig (http://editorconfig.org). The default EditorConfig indentation
style is defined in the .editorconfig file placed on the root of the project
source code tree (4-space indentation for C). One advantage of following the
default style is that no additional EditorConfig settings are required for new
files. If your file does not follow this style please add a file-specific
setting overriding the default style to a separate .editorconfig configuration
file placed in the source file directory.
Some IDEs and text editors have built-in EditorConfig support and many more
have plugins available (links at http://editorconfig.org).
Please do not leave trailing whitespace (spaces/tabs) on lines.